| Author |
Javadoc on Jar
|
Yoo-Jin Lee
Ranch Hand
Joined: Nov 01, 2000
Posts: 119
|
|
Hi, Can anyone enlighten me on how to generate javadoc comments on jar files by: javadoc .... I can do it for regular files but when I set the sourcepath to the jar file that contains all my classes I get errors. Thanks in advance. Yoo-Jin.
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
I don't believe that you CAN create JavaDoc out of a Jar file.
JavaDoc Options As parameters to JavaDoc, you can specify a single source file, multiple source files, or package names. If you specify a package name, you will get documentation for all the classes in the package, including a class hierarchy and an index. Javadoc searches your CLASSPATH for the specified files. To include directories that are not in your classpath, you can specify -classpath parameter to Javadoc to add those. -classpath (specify the classpath to use) -sourcepath (specify where the source files (.java) are, not the .class files.) -version (If a version tag is found, it will be included in the documentation) -author (If an author tag is found, it will be included in the documentation -noindex (do not generate index) -notree (do not generate tree information) -d (specify the directory for the output files) -verbose (produce a detailed listing from the JavaDoc compilation)
There is no mention in this of a source jar being an input. However, there is nothing stopping you from decompressing the jar into a temp directory, running the utility against the source files and then deleting the temp directory. Any unzip or File Librarian type of utility will unzip them... I peek at one or two all the time.
|
"JavaRanch, where the deer and the Certified play" - David O'Meara
|
 |
Yoo-Jin Lee
Ranch Hand
Joined: Nov 01, 2000
Posts: 119
|
|
Cindy, Thanks for your reply. I was hoping I wouldn't have to extract everything, but I guess really it's no big deal. cheerios, Yoo-Jin.
|
 |
Madhav Lakkapragada
Ranch Hand
Joined: Jun 03, 2000
Posts: 5040
|
|
You still don't have to extract everything. You could use the -t option of jar to get a list table of contents for archive jar -t myJarFileName.jar Is this what you are looking for? regds.  - satya
|
Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
|
 |
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
|
|
|
Well, that does get you a table of contents, but not the JavaDoc for those classes.
|
 |
 |
|
|
subject: Javadoc on Jar
|
|
|