Here is a link to a javadoc Tutorial.
The javadoc tool is a command line driven one with the following command format.
javadoc [ options ] [ package-names ] [ source-files ] [ @files ]
The arguments may be in any order and are briefly described below.
|
|
|
| options | Various options used to control the document generation process. |
| package-names | The list of packages that you wish to document. Each package name is separated by a space. |
| source-files | The list of source files that you wish to document. Each name is separated by a space. |
| @files | One or more text files that contain the names of the packages and source files that you wish to document. |
|
|
|
| -author | Includes the text for the @author tags. |
| -d directory | This is the directory where the generated HTML files will be saved. When this option is not used, the HTML files are placed in the current directory. |
| -verbose | The messages displayed by javadoc during processing will be more detailed than the default. |
| -version | Includes the text for the @version tag. |
c:\> cd mycode
c:\mycode> javadoc Demo.java Test.java R*.java
In this example, the classes Demo.java, Test.java and all classes that start with R are documented. Notice that the user first changed the working directory to c:\mycode before executing the javadoc utility.
Another method is to specify the full path of the classes to be compiled.
c:\temp> javadoc c:\mycode\Demo.java c:\mycode\Test.java c:\mycode\R*.java
The same classes are being documented but in this case, the user is in the directory c:\temp and so has to enter the full path.
c:\mycode\Demo.java
c:\mycode\Test.java
c:\mycode\R*.java
Then the following command can be invoked.
c:\temp> javadoc @mylist
All of the classes listed in the file mylist will be processed. Note that more than one of these special files can stated as long as each begins with the @ character.