About Java Class Libraries
See Also
A Java class library is a group of resources needed by a project. Typically
a class library includes one or more JAR files containing compiled classes, the source files
needed to debug the classes, and Javadoc documentation for the classes. In the
IDE, you can create and edit libraries using the Library Manager. To open the Library
Manager choose Tools > Libraries.
By creating Java class libraries within which to store the JAR files on your
project classpath, you can do the following:
- Group related JAR files that you use frequently.
- Add Javadoc documentation for your classes to a project. This enables you
to automatically open the Javadoc page for any class in the library.
- Attach source code to your classes. This enables you to step through the source
code when debugging your program or use the Go To Source command to open the source file.
Notes:
- You can also associate sources or Javadoc documentation with an individual
JAR file that you have added to your project. In the Projects window,
right-click the project's node and choose Properties. Then select the Libraries
panel, select the JAR file from the list of libraries, and click Edit. You can
add references to sources and Javadoc documentation.
- You can configure a project to use a
dedicated libraries folder in order to
make it easier to share the project with other users.
- When you attach Javadoc documentation and source code to a JAR file in
the Library Manager, the IDE automatically registers the documentation and
source code in every project that has that JAR file on its classpath. You
do not have to remove the JAR file from the classpath and add it as a library.
- See Also
- Managing the Classpath
- Sharing Libraries in a Java Project
- Adding Javadoc to a Project
- Attaching Source Code to a JAR File
- Setting the Target JDK
Legal Notices