Standard Java SE Project Properties Dialog Box: Libraries

See Also 

The Libraries panel enables you to configure the project's classpath and the way project dependencies are handled.

You open the Standard Java SE Project Properties dialog box by right-clicking any  node and choosing Properties.

Java Platform. The target Java platform against which all source files are compiled and run. By default, the Java platform on which the IDE is running is listed. You can add a platform by clicking Manage Platforms.

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, Processor, Run, Compile Tests, and Run Tests Tabs. Enable you to configure the classpath individually for compilation, runtime, compile-time testing, and runtime testing.

Use the buttons on the right side of the panel to add, remove, and change the order of classpath elements. You can add any of the following:

In addition to other libraries, you can add annotation processors to the classpath or the processor path of your project. The annotation processors are specified as either a library, a JAR file, or another NetBeans IDE project. You can add annotation processors on the following tabs: Compile and Processor. Additionally, you can specify the FQN (fully qualified name) of the annotation processor on the Compiling tab.

Adding annotation processors to project's classpath on the Compile tab. When an annotation processor is packaged together with its annotations as a single JAR file, specify this JAR file on the Compile tab. In this case, there is no need to add it to the Processor tab. The resources added on the Compile tab correspond to the –classpath option of the Java compiler.

Adding annotation processors to the processor path on the Processor tab. When an annotation processor and its annotations are packaged into separate JAR files, add the JAR file with the processor on the Processor tab and the JAR file with the annotations on the Compile tab. The resources added on the Processor tab correspond to the -processorpath option of the Java compiler.

Build Projects on Classpath. If selected, all projects on which that project depends are built when you use the Build command. You can temporarily clear this checkbox to make builds of the project faster.

Notes:

See Also
Sharing Libraries in a Java Project
About Standard Projects
About Free-Form Projects
Standard Java SE Project Properties Dialog Box:
         Sources
         Compiling
         Packaging
         Documenting
         Run
         Application
         Desktop App
         Web Start
         Formatting
 

Legal Notices