The JavaDoc tool is a program that reads a collection of source files into an internal form.
The structure is:
The tool uses a JavaDoc doclet in a manner similar to a pluggable back end to analyze the internal form of the source files and generate output files.
The content of the generated files is specific to the doclet. The standard doclet generates HTML output, but a different doclet could generate other output, such as a report of misspelled words or grammatical errors.
If you specify a doclet other than the standard doclet, then the descriptions in this guide might not apply to the operation of that doclet or the files (if any) that are generated.
To use the JavaDoc tool, you must:
Use source code that contains Java documentation comments.
javadoctool with a doclet to analyze the documentation comments and any other special tags. If you don’t specify a doclet in the command, the Standard Doclet is used by default.
In addition to the descriptions in this guide, JavaDoc tool users and content developers should use the following documentation:
JavaDoc features include the following: JavaDoc search, support for generating HTML output, support for documentation comments in module systems, and a new Doclet API introduced in JDK 9.
When the JavaDoc tool runs the standard doclet, it generates output that enables users to search the generated documentation for elements and additional key phrases defined in the generated API documentation. Search results include matching characters from any position in the search string. The Search facility can also provide page redirection based on user selection.
Note:See the Javadoc Search Specification for detailed information about using Search.
javadoc tool supports documentation comments in
module declarations. Some JavaDoc command-line options enable you to specify the set
of modules to document and generate a new summary page for any modules being
documented. It has new command-line options to configure the set of modules to be
documented and generates a new summary page for any modules being documented.
Note:Users running the JavaDoc tool to generate API documentation should see the javadoc Command man page for detailed information.
The standard doclet only generates HTML output.
Note:Authors writing content for API docs should see the Documentation Comment Specification for the Standard Doclet (JDK 17) for detailed information about Syntax and Tagging requirements for generating JavaDoc HTML files.
The Doclet API uses powerful APIs that represent all of the latest language features.
Note:See Module jdk.javadoc for detailed information.