CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades

Packages

Packages
javadoc
Generate documentation

How to generate and view the documentation for a package

  • The javadoc tool lets you generate HTML-based documentation like the documentation for the Java API.
  • You can use the javadoc tool to generate documentation for one or more packages or for a single class.
  • You can view the documentation that's generated by the javadoc command by starting a web browser and pointing to the index.html file that's created in the directory you specify.

The syntax for generating documentation for one or more packages

C:\parentDir>javadoc -d docsDirectory packageName1 [packageName2]...

A statement that generates documentation for a single package

C:\java\lineItem>javadoc -d c:\java\lineItem\docs\business murach.business

A statement that generates documentation for three packages

C:\java\lineItem>javadoc -d c:\java\lineItem\docs murach.business murach.database murach.presentation
Previous | Add comments | use HTML | Generate documentation | View documentation | Next