This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I'm having trouble learning how to use javadoc, perhaps someone can help clarify. I am using Visual Cafe (no hisses please!) and I have three classes in the same package: class a.b.c.D class a.b.c.E class a.b.c.F and I would like to create javadocs for all three of these classes at once. My three source files D.java, E.java, and F.java are all in the folder C:\JavaStuff When I compile the three source files using the IDE, it automatically creates the folder: C:\a\b\c\ and in this folder is the compiled class files (D.class, E.class, F.class) I am trying to invoke javadoc from the command line (there is probably a way to do it from the IDE as well) and from the C:\JavaStuff folder I have tried: javadoc D.java or javadoc E.java or javadoc F.java and each one works but it overwrites the others. What I want is one command to create javadocs for all three files at once, and it seems like this should be possible since I have put them all in the same package. I tried specifying the package the way you would with jar: javadoc a\b\c\* and that doesn't work since it tries to package the .class files, and not the source code. I tried copying the source code into the C:\a\b\c folder and the above command still didn't work since it found all files including the .class files. I tried it without the asterisk and that didn't work either. This has me wondering if my source files should be in the a\b\c folder instead of at the top level? Maybe if I were using the sun SDK compiler I would have been required to do this and now I would have no trouble creating the javadocs? There is a key concept here I am missing. Tony
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Feb 23, 2001
Hi Marilyn, I was using the Java in a Nutshell as my guide, but I'll read through the official javadoc guide. It is quite thorough and I was hoping to get a quick answer as to what I was doing wrong instead of having to invest 30-60 min reading through it. Also, the documentation is confusing to me. For example, it says the syntax is: javadoc [ options ] [ packagenames ] [ sourcefiles ] [ @files ] and from what I can tell all the options begin with a hyphen (dash) character such as -SOURCEPATH. But when I look at the "Real-World Example" listed, it seems to include many options but no packagenames or sourcefiles, which is confusing to me. Tony