Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble with javadocs

 
Tony Jackson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've seen this page, right?
 
Tony Jackson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic