- You first need to annotate the code with documentation, such as the following:
- Package ? wz.learning;??
- ???
- /**?
- ?*? Title:person<br>?
- ?*? Description:?
- ?*? COMPANY:SKJP?
- ? *[email Protected]?xiashengwang?
- ? *[email protected]?1.0?
- ?*/??
- Public ? class? Personwz? {??
- ???? /**?
- ????? *? This is the constructor for person ?
- ????? *[email protected]?name? person 's name -?
- ????? */??
- ???? Public ? PERSONWZ (string?name) {??
- ???????????
- ????}??
- ???????
- ???? /**?
- ????? *? This is the Read method ?
- ????? *[email protected]?bookname? title ?
- ????? *[email protected]?time? the time of reading ?
- ????? *[email protected]? return Number of readings ?
- ????? */??
- ???? Public ? int ? Read (String?bookname,? int ? time) {??
- ???????? return? 0;??
- ????}??
- }??
2, through Eclipse generation is the simplest, in the project in the project list, right-click, select Export (Export), and then in the Export dialog box, select Javadoc under Java, submit to the next step.
There are two places to note in the Javadoc Generation dialog box:
Javadoc command: The bin/javadoc.exe of the JDK should be selected
Destination: To create a saved path for a document, you can choose freely.
Press Finish to submit to start generating the document.
Note that the resulting document may be garbled and can be resolved as follows:
Export the JavaDoc in Eclipse and fill in the parameters in extra JavaDoc Options on the last page of the wizard
For example, the project uses the UTF-8 code to fill:-encoding UTF-8-charset UTF-8
The document structure after the build is as follows:
Click on the index, you can see our comments.
Generation of Java Help documentation