• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Issues using javadoc on a folder structure

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a folder structure with a lot of java files in various folders. I'm attempting to use the javadoc command from the command line to create javadocs for all .java files existing in this folder structure. I'm struggling with the syntax.

Here is an example of the folder structure. Folders are in bold and files are in italic.




Here is my javadoc command that I'm running from the folder containing the b2b folder



Here is the error I'm getting



I know this is something silly, I'm just not thinking clearly today.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IIRC:
 
Brian M Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:IIRC:



David,

Thank you for the response. I don't have the subpackage option. I'm using a 1.4.x JDK. I tried the following command and it didn't work correctly saying that No packages or classes specified.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.4 was EOL'd like a year ago; consider not using it. Even if it is--you can still generate Javadocs using a real JDK.

Did you read the docs at the javadoc 1.4 page?

It's -subpackages; I made a typo.
 
Brian M Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:1.4 was EOL'd like a year ago; consider not using it. Even if it is--you can still generate Javadocs using a real JDK.

Did you read the docs at the javadoc 1.4 page?

It's -subpackages; I made a typo.



David,

I realize that 1.4 is EOL, but unfortunately the application that I'm working with is using it and it's not possible to update the JRE without a ton of work.

I did read the docs at suns website, but I'm still fumbling around with the syntax. I'm not sure how the -sourcepath argument works and how to make the javadoc command look at only .java files.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand why the command I gave you, with the typo corrected, doesn't work for you: it works fine for me.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brian M Smith wrote:

David Newton wrote:IIRC:



David,

Thank you for the response. I don't have the subpackage option. I'm using a 1.4.x JDK. I tried the following command and it didn't work correctly saying that No packages or classes specified.



In addition to defining the sourcepath, you also have to define the packages or java files. So for example if I had an application source code structure that looked like this:
C:\b2b\com\steve\util\<some source files>
C:\b2b\com\steve\app\<some source file>
C:\b2b\com\steve\gui\<some source files>

Then I would do:
javadoc -d "C:\docs" -sourcepath "C:\b2b" -subpackages com
And that should create javadocs for source code in the com package, and all subpackages (recursively), found inside the "C:\b2b" directory.
 
Brian M Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Steve and David. I was able to use the javadoc command. I appreciate the help!
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No sweat :)
 
You have to be odd to be #1 - Seuss. An odd little ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic