Comments in Java have three kinds of 1 single-line comments//+ Content 2 Multiline comments/* content */3 Document Comment/** content */
Where single-line comments and multiline comments are comments that are used in methods, document comments are used to annotate the members and methods of the class.
The Help file is implemented with multiline annotations, and the program is in Java in the JDK directory under the bin directory JAVAdoc.exe.
First open the Eclipose and find a project that needs to generate a help document. The classes in the project are marked with multiple lines of annotations of methods and properties. Like what
Package java4_10;/** * * * @author me **/ Public classDEpt {Private intAge ; PublicString name; PublicString master;/** * modifier, can complete the modification of the private property * @param age*/ Public voidSetage (intAge ) { This. Age =Age ;}/** * accessor, can get the value of private property * @return Age*/ Public intGetage () {return This. Age; Public voidsetName (String name) { This. Name =name;} PublicString GetName () {return This. Name;}}
Then right-click on the project to find the export option, select Java ————— in the following dialog box Javadoc
Double-click Javadoc to jump to the following dialog box
Under Destination, select the save location for the Help file you want to generate
Select Java Javadoc.exe Program path click Finish to automatically generate the Help file
And then, where you save the Help file, you have the following file.
Then click Index.html to select the class of the package you want to view to see the Help document
How Java generates help documents in Eclipose