You open the Standard Web Project Properties dialog box by right-clicking
any
and choosing Properties.
The Libraries page lets you specify the
classpath for the project, by setting the following properties:
Java Platform: Specifies the target Java platform against which all
source files are compiled and run. Available Java platforms are those that have been registered in the
Java Platform Manager.
Libraries Folder. To make it easier to
share libraries among different
users and projects, you can set a folder to hold those libraries (or references to
those libraries). You can create a new folder or specify an existing folder that
already contains copies of the libraries on which your project depends.
To specify the folder, click Browse. If there is already a libraries folder, a
file chooser opens. Within the file chooser, you can select a folder for your libraries.
You can also configure whether each library is referenced with a relative path or
an absolute path. If there is not a libraries folder, the New Libraries wizard opens.
In the New Libraries wizard, you set a libraries folder and then specify how to reference
each library. The simplest case is to have the libraries copied to that folder.
You can also refer to the libraries in their existing location
(with a relative path or an absolute path). If you have specified an existing folder,
you also have the option of using copies of libraries that are already in that folder
instead of the copies that are contained in the IDE's Library Manager.
Compile. Compile Tests. Run Tests. Specifies entries that are on each of the classpaths.
You can add any of the following entries:
Project. The build output, source
files, and Javadoc files of another IDE project.
Library. A collection of binary
files, source files, and Javadoc files.
JAR/Folder. A JAR file or folder containing classes. The folder must contain classes. If the
folder does not contain classes but, for example, images instead, use the Packaging page to add them to
the project.
By default, all items that are on the classpath are packaged in the WAR file. Uncheck
the Package checkbox for each classpath item that you want to exclude from the WAR file.
Build Required Projects (Libraries and additional WAR content).
By default, the projects required by the current project are built when the current
project is built. Required projects are projects on the classpath as well as projects
defined in the Packaging page. Unselect the Build Required Projects checkbox if you do
not want the required projects to be built when the current project is built.
Notes:
If you want to include a resource in the project, but not on the classpath, use the Packaging page instead.
If a JAR file is registered as a Java Class Library and has attached source
code and Javadoc documentation, you can just add the JAR file to the classpath
and the IDE finds the Javadoc documentation and source code automatically.
You should use the Add Library button if you want to add a library that contains
several JAR files. Adding a Java Class Library rather than a regular JAR file
also makes it easier for other developers you share the project with to fix
broken references to Javadoc documentation and source code.
Adding a to the classpath of a standard project does nothing
unless you have declared the free-form project's build outputs in the Output
page of its Project Properties dialog box.