Java Reference
In-Depth Information
Naturally we have all the source code sitting in the src directory, so that can easily be
incorporated into our submission. Likewise we already have the database file sitting in the
root directory, so the only thing remaining is the Javadoc API documentation.
First up we need to create a directory to hold the documentation. We can do that with the
following command:
mkdir doc\api
The command to build the Javadoc API would be
javadoc -quiet -link http://java.sun.com/j2se/1.5.0/docs/api/
-d doc\api -sourcepath src -public
sampleproject.db sampleproject.gui sampleproject.remote sampleproject.sockets
Note Note That Javadoc command line is all one line—we have just spread it over three lines in this
book to make it easier to read.
An example of running that command line is shown in Figure 9-16.
Figure 9-16. Building the Javadoc API on the command line
A full explanation of the options we used in our command line, plus many more options
we have not used (but you may want to), are listed in the “Running Javadoc from the Com-
mand Line” section of Chapter 2.
A simpler option, especially if you are likely to be re-creating the API documentation on a
regular basis, is to store all the options in one or more option files. These can be any plain-text
file, and each option can be space delimited or newline delimited. An example of using such a
file is shown in Figure 9-17.
Search WWH ::




Custom Search