Viewing and editing a project's Java build path
A project's Java build path can either be defined when creating the project with the New Wizard or later in the project's property dialog. The Java build path settings dialog
is the same in both cases. To view and edit a project's Java build path, follow these steps:
- Select the project you want to view or edit
- From the project's pop-up menu, select Properties
- Select the Java Build Path page
- Define the source entries for the build path on the Source page:
- Click the Use source folders contained in the project radio button to use folders instead of the project itself to contain source containers.
Click the Create New Folder or Add Existing Folder buttons to add source folders to the Java build path.
The Remove button removes the selected folder(s) from the build path, Edit lets you modify the selected entry.
- For simple projects, click the Use the project as source folder radio button to use the project itself as the folder for source code. This adds an entry for
the project itself to the Java build path.
- On the Projects page, identify the other projects that are required for building this project. The list shows all the existing Java projects from the workbench.
Note: Each selected project is automatically added to the list of referenced projects.
- On the Libraries page, define the libraries required by your project. Libraries come in different forms. There are buttons for adding a library in each form. By default, each Java project
has a JRE_LIB entry on the build path. This entry stands for the workbench's default JRE.
- On the Order and Export page, define the Java build path order. The recommended ordering is to have source entries before the library entries and the required projects.
Java builder
Build classpath
Adding a JAR file to the build path
Adding a library folder to the build path
Adding a variable class path entry
Building a Java program
Working with build paths
Working with JREs
Java Build path