• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issues using javadoc on a folder structure  RSS feed

 
Brian M Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IIRC:
 
Brian M Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks Steve and David. I was able to use the javadoc command. I appreciate the help!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No sweat :)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!