Beginners problems
i'm new to javadoc, and i'm having a huge problem getting it configured. i've spent 2 hours going through javadoc FAQ's, and i can get it to work for one class, but not for my package. could someone please shed some light on this one? i think it's reletively simple, but i'm stressing out here big time, because i don't know what i'm doing.
here's my batch file:
javadoc \
-verbose \
-author \
-version \
-d /usr/JBoss-2.2.2_Tomcat-3.2.2/tomcat/webapps/intranet/doc \
-sourcepath /usr/java/jdk1.3.1/bin/java \
java.awt
any help would be GREATLY appreciated.
[634 byte] By [
wireframe] at [2007-9-26 6:39:40]

You have java.awt at the end of your command.Are you trying to generate Javadoc documentation for the package java.awt ?
yeah, just to try out javadoc i wanted to generate the info for java.awt. i will be changing that to my own package once this works.
Okay.But then, You have specified your sourcepath to be /usr/java/jdk1.3.1/bin/javaDo you really have the source for java.awt package classes in that directory ?
hmmmm.....guess not.
i think i assumed wrong following the javadoc examples.
i actually just got it to work. i had to have my package in a jar file though. is that supposed to be that way?
here's my current script, that appears to be working for the bpc.util classes. it errors if i just try and do bpc though. why's that?
sorry, i forgot to copy this in!javadoc \-d /intranet/doc \-classpath /intranet/BPI \-sourcepath /intranet/src \bpc.util
1. Is bpc.util a class or a package ?2. Is bpc a class or a package ? If bpc is a package, does the package bpc really have any classes directly under it ?
bpc is a package that i work with. at it's root, there are no classes. then i have apps, util, and ejb are all subdirectories of the bpc package. util and ejb have classes in their directory.
is it possible to have it recurse through these packages? i have classes in the util package, and i also have more subdirectories. here's a short breakup
bpc - no classes
bpc.util - classes and subdirectories
bpc.apps - subdirectories
bpc.ejb - classes and subdirectories
If you are trying to generate javadoc for multiple packages together (most likely when you have the packages sort-of nested in the tree form), you can use the @files parameter to the javadoc tool command. Where file is a text file that has the list of packages for which to generate javadoc documentation.
When you give bpc by itself to javadoc, javadoc has no way of knowing that it should treat that name as the name of a directory and automatically recurse inside it to locate java packages and classes.
one quick question i have is this:
isn't the bpc and all of it's subdirectories ONE package?
i could be wrong here, since i'm relatively new to java (only using java for about one year now).
if this is not the case, is there a way (other than a separate text file) to have javadoc recurse?
<< isn't the bpc and all of it's subdirectories ONE package?
No. bpc, bpc.abc, bpc.xyz are all diferrent packages.
<< is there a way (other than a separate text file) to have javadoc recurse?
Not that I know of. Thats why you have the @files parameter.
And, by the way, you could also list the packages one after another separated by space to the same javadoc command.Like...javadoc -d destinationDir -sourcepath sourceDir package1 package2 package3
with the @files parameter, it looks for a specific file. is it required to be filenames.txt ? or something else.
i got it to work finally.thank you so much for your help!!
Thanks, neville_sequeira for helping with wireframe's questions.
Javadoc 1.4 Beta 2 does allow you to recurse from the top
directory down, as you request, with an option called
-subpackages. You can also exclude packages.
The documentation for it is at:
http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/javadoc.html#subpackages
I'm surprised no developer has yet mentioned on this forum that
they have tried it. We are looking for feedback on it. It is
mentioned in the previous posting:
### Javadoc 1.4 Beta 2 feedback wanted
-Doug Kramer
Javadoc team
dkramer,Thanks for the update.