The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How do i run javadoc with packages? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "How do i run javadoc with packages?" Watch "How do i run javadoc with packages?" New topic
Author

How do i run javadoc with packages?

Karl Fu
Ranch Hand

Joined: Mar 26, 2001
Posts: 41
How do i run javadoc with packages
Also, I have read that I can't use :
e.g.
import java.util.*;
but to use
import java.util.Vector;
is it true ?
Thanks in advance
Karl
Akanimo Udoh
Ranch Hand

Joined: Jun 11, 2001
Posts: 48
Karl,
The command line for running javadoc for packages (on windows) is:
javadoc -sourcepath c:\scdj\suncertify\src -package suncertify.db suncertify.server suncertify.client
Just place all the packages you want processed after the '-package' option. You can specify documentation for each package by including a file called 'package.html' in the source directory and placing the text you want in this 'package documentation' between <BODY> tags in the file.
About importing classes, both methods you mentioned are both legal and allowed. It is only advised that you use the explicit
<code>import java.util.Vector</code>
so that anyone can tell at a glance of looking at your source exactly which classes you used. This is not compulsory. Whatever approach you chose its important that you remain CONSISTENT in its use throughout your project.
Akanimo.
Karl Fu
Ranch Hand

Joined: Mar 26, 2001
Posts: 41
Thanks Akanimo
However, i am still alittle confused in how to put comment for packages, can you explain it a little further.
So does adding comments to my static variables
Karl
Akanimo Udoh
Ranch Hand

Joined: Jun 11, 2001
Posts: 48
Karl,
Just create a file called 'package.html' in the folder where the source code for the package is. i.e for a package called suncertify.server (whose *.java files are in c:\scdj\src\suncertify\server ) you would create the file in this directory.
Then open the file in text mode (just change the file extension to '.txt' when you finish change it back to '.html') and type:
<body>TYPE THE COMMENT FOR THE PACKAGE IN HERE <body>.
Thats all! (remember to rename the file to '.html') When you run javadoc you should then be able to see documentation for the whole package.
Hope its clear?
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 02, 2001).]
Ravikiran Choppalli
Ranch Hand

Joined: Nov 18, 2000
Posts: 49
Hi,
I'm little bit confused now. I've already submitted by assignment on thursday. But I used KAWA IDE to generate javadoc. I just placed all the java files in a folder and ran Javadoc from the IDE. It created all the HTML files including index etc. But I don't have HTMLS on Packages. Is that OK ? If anyone knows that is O.K. please reply back. That would be GREAT.
Thanks,
Ravi.


Thanks,<BR>Ravikiran<BR>rkchoppalli@yahoo.com
 
IntelliJ Java IDE
 
subject: How do i run javadoc with packages?
 
Threads others viewed
javadoc question
javadoc : packages.html / overview-summary.html
how do u start with..
importing packages in a class
j2ME package errors
developer file tools