Name
javadoc — The Java Documentation Generator
Synopsis
javadoc [options
]@list
package
...sourcefiles
...
Description
javadoc
generates API documentation for any number of packages and classes
you specify. The javadoc command line can list
any number of package names and any number of Java source files. For
convenience, when working with a large number of command-line
options, or a large number of package or class names, you can place
them all in an auxiliary file and specify the name of that file on
the command line, preceded by an
@
character.
javadoc uses the javac compiler to process all the specified Java source files and all the Java source files in all the specified packages. It uses the information it gleans from this processing to generate detailed API documentation. Most importantly, the generated documentation includes the contents of all documentation comments included in the source files. See Chapter 7 for information about writing doc comments in your own Java code.
When you specify a Java source file for
javadoc to process, you must specify the name of
the file that contains the source, including a complete path to the
file. It is more common, however, to use javadoc
to create documentation for entire packages of classes. When you
specify a package for javadoc to process, you
specify the package name, not the directory that contains the source
code for the package. In this case, you may need to specify the
-sourcepath
option so that
javadoc can find your package ...
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.