How Java generates help documents in Eclipose

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.