Java Reference
In-Depth Information
Both those command lines will generate the API documentation in the current working
directory, which may not be desirable. You can specify the directory where API documentation
should be stored by using the -d option:
javadoc -d doc/api com.example.mypackage com.example.more.packages
Tip Javadoc will convert Unix-style pathnames into platform-specific pathnames. This is especially useful
when you are developing scripts that may be run by unknown people on potentially any platform.
You can add many more options, turning features on or off as desired. For example:
1 javadoc \
2 -d doc/api \
3 -version \
4 -author \
5 -use \
6 -source 1.5 \
7 -windowtitle "Denny's DVD application" \
8 -doctitle "<h1>The SCJD Exam with J2SE 1.5 Project</h1>" \
9 -bottom "<i>Developers: Andrew Monkhouse and Terry Camerlengo</i>" \
10 -sourcepath src \
11 -linkoffline http://java.sun.com/j2se/1.5.0/docs/api /jdk_1.5/api \
12 sampleproject.gui sampleproject.db sampleproject.remote
The meaning of the new tags is explained in Table 2-9.
Table 2-9. Meaning of Common Javadoc Command-Line Options
Line
Option
Meaning
-d
2
Used to specify the output directory for generated API.
3
-version
Specifies that the version information in your Javadoc comments
will be incorporated into the generated API.
4
-author
Specifies that the author information in your Javadoc comments
will be incorporated into the generated API.
5
-use
Tells Javadoc to include a “use” page for each class, detailing where
it is used as either a parameter in a method or as a return value.
6
-source
Specifies which version of the JDK the Javadoc should maintain
compatibility with.
7
-windowtitle
Specifies the title to appear at the top of your browser (where
supported).
8
-doctitle
Specifies the title to appear on the package summary page.
-bottom
9
Specifies text that appears on the bottom of every generated page.
10
-sourcepath
Specifies the base directory containing your packages.
-linkoffline
11
Creates links to existing Javadoc entries. See the description in the
paragraph that follows.
Search WWH ::




Custom Search