Java Reference
In-Depth Information
<applet
CODEBASE = codebaseURL
code=HelloWorld
archive="ajarfile"
width=200
height=200>
</applet>
As with regular class files, an applet's jar filename is relative to the CODEBASE
directory.
J AVADOC U TILITY
Javadoc is a utility that allows the programmer to document the code in the source
and then easily generate the documentation in a readable format. Javadoc goes well
beyond the comment feature in COBOL, although it also can serve the same pur-
pose. The difference with Javadoc is that the utility has the ability to process specially
formatted comments in Java source code and produce external documentation, in-
cluding a complete class structure showing inheritance and other relationships be-
tween the classes.
Javadoc is a utility provided in the standard Java SDK that parses source code
and, by default, automatically generates HTML output that documents the Java code.
The executable code for Javadoc is found in the bin directory in which the SDK is in-
stalled. In reality, the Javadoc executable is a starter application that creates a Java VM
and invokes a doclet to do the work of generating the output documentation.
You run Javadoc by executing the program at the command line and passing a
directory or list of directories to the utility. This action produces HTML pages that
link together to document and index the classes found in the directories. It does not
automatically copy the various images referenced in the HTML to the proper loca-
tion, so you will need to do that manually.
Standard Javadoc comments start with /** and end with */ . Note the double
asterisks at the start that distinguish the Javadoc comment from an ordinary mul-
tiline Java comment. Comments can be plain text or can include HTML code.
Here's how a comment might look embedded in Java code:
/** The purpose of this comment is to help in the automatic generation of
documents. A programmer can insert (well-written) descriptions of classes
and members. These will be extracted and placed into a published document
in HTML format.
*/
Search WWH ::




Custom Search