Perumss
Perumss

Reputation: 137

How to create java api document for a project/application?

I need to know how to create java api document for a project/application? I know to create comment in eclipse like

 /**
 * Method to add two number
 * @param a int value
 * @param b int value
 * @return a+b
 */
private int add(int a,int b){
    return a+b;
}

But I need java document file while I clicking on the document should open like sun java document so how to create and making connection between the document and project/application.

Upvotes: 0

Views: 1849

Answers (2)

jobukkit
jobukkit

Reputation: 2670

Just like Dan said, it is called Javadoc. Try

File > Export - and then - Java > Javadoc

in Eclipse, choose a destination folder under Destination, click the checkboxes to select wich java files to generate documents for, and click Finish. If a popup window appears click "Yes to all". Go to the folder you have chosen as the destination, and open allclasses-frame.html or allclasses-noframe.html .

Ta-dah!

Upvotes: 3

Dan D.
Dan D.

Reputation: 32391

The tool for doing this is called javadoc. For smaller projects you can use it from the command line. However, I suggest you learn how to integrate it with automatic build tools like ant.

Upvotes: 2

Related Questions