Adding Javadoc to a Project
See Also
You can make Javadoc documentation for a JAR file's class available in the IDE
by associating that documentation with the JAR file.
If you want to have access to compiled JDK documentation through the IDE,
see Adding the JDK Javadoc to the IDE
- When you add a required project to a project's classpath, the required
project's Javadoc and sources are automatically added to the project as
well.
To add Javadoc for a JAR file:
- Choose Tools > Library
Manager from the main menu.
- In the left pane of the Library Manager, select the project library
within which the JAR file you want to add Javadoc documentation to is located.
- Only libraries already registered with the IDE are listed in the Library Manager's
Class Libraries list.
- If the JAR file for which you want to add Javadoc documentation
has not already been added to a registered library, create a new empty library
using the New Library button. Next,
in the Classpath tab click Add JAR/Folder and specify the location of
the JAR file containing the compiled class files.
Notes:
- You can also associate the Javadoc with a JAR file using the project's Project
Properties window. However, doing so creates the association only for that project.
Open the Project Properties dialog box by right-clicking the project node and
choosing Properties. Select the Libraries node in the Categories pane. Then
select the JAR with which you want to associate the Javadoc and click Edit.
You can then specify the sources to be associated.
- A class library
can contain multiple JAR files as well as their Javadoc documentation and
source code.
- In the Javadoc tab, click Add ZIP/Folder and specify the location of the
Javadoc files.
- Click OK to exit the Library Manager.
The IDE adds the selected JAR files and Javadoc documentation Zip files
to the specified library and automatically registers the documentation in
every project that has that JAR file on its classpath.
- When you create a Java class library for a
single JAR file, you can simply add the JAR file to the project's classpath
to make the associated Javadoc and source code available. If your
Java library contains multiple JAR files, however, you must add the library
itself to the classpath. Adding the library to the classpath also makes
it easier to share the project with other developers.
- See Also
- Managing the Classpath
- Attaching Source Code to a JAR File
- Viewing Javadoc Documentation
Legal Notices