• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble with javadocs

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You've seen this page, right?
 
Tony Jackson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic