File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes javadoc and...... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "javadoc and......" Watch "javadoc and......" New topic

javadoc and......

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

(1) I want to document the project i am working in. What i did earlier was copied hundreds of files to a common directory and tried javadoc -private *.java . But i did not know that there is a option to that javadoc will itself find out all the java files to document in a directory structure. Want to know of that parameter from u guys.
(2) If a few of my java files are not properly coded (so will give javac compiler error), then would javadoc not create the html pages?

Ashik Uzzaman
Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
as to your second question:
you are correct in your assumption.
javadoc first compiles the code using javac then generates the html, therefore if your files wont compile , it wont generate help for them either (or should it be neither)
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
I've heard rumors that the newest Javadoc will traverse source directories recursively, but I don't know if that's true or not.
What I usually do is I create a text file that contains the names of all the packages in my project, then I pass this textfile as a paramater to javadoc via the @files paramater.
Also, you are correct that the source files must compile. Javadoc actually pre-parses the sourcecode by calling javac on your source files, so if they won't compile, it won't create any javadocs for them.

SCJP 1.4
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

Thnx Roy & Rob....i have tested my second assumption that i was correct. So the files that won't compile should be out of the folder.
The first query should be true as i have still waiting .....
I agree. Here's the link:
subject: javadoc and......
It's not a secret anymore!