How Do I Document Packages in Java?

Up to and including Java 1.4, you had to provide a HTML file package.html, as described in the other answers.

Since Java 1.5 you can also provide a package-info.java, which contains a regular Javadoc comment (no HTML). The latter is preferred, as it gives you some extra features (notably package annotations).

Details: Sun's docs for javadoc


As of 1.5 you can define a package-info.java file and provide a standard javadoc style comment for a package:

com/foo/package-info.java:

/**
 * com.foo is a group of bar utils for operating on foo things.
 */
package com.foo;

//rest of the file is empty

Language specification for packages