Viewing and Editing a Project's Build Path

A project's build class path can either be defined when creating the project with the New wizard or later in the project's property dialog. The build path settings dialog is the same in both cases. To view and edit a project's build path, follow these steps:

1.

Select the project, and from its context menu, select Properties.

2.

In the Properties dialog, select the Java Build Path page.

3.

On the Source page, define the source entries for the build path.

  • Click the Use source folders contained in the project radio button to use folders instead of the project itself to contain source code. Click the Create New Folder and/or Add Existing Folder buttons to add source folders to the build path. The Remove button removes the selected folder(s) from the build path.
  • 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 build path.

4.

On the Projects page, identify the other projects that are required for building this project. The list shows all the existing projects in the workbench.

Note: Each selected project is automatically added to the list of referenced projects.

5.

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. See Adding a Library Folder to the Build Path

By default, each Java project has a JRE_LIB entry on the build path. This entry stands for the runtime JAR file for the workbench's default JRE. See Working with JREs

6.

On the Ordering page, define the build class path order. The recommended ordering is to have source entries before the library entries and the required projects.