Adding a classpath variable to the build path

To add a classpath variable to the Java build path of a project,...

  1. Select the project to which you want to add the classpath variable

  2. From the project's pop-up menu, select Properties

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

  4. On the Libraries tab, click Add Variable for adding a variable that refers to a JAR file.
    The New Variable Classpath Entry dialog appears which shows all available classpath variables.

    Classpath variable dialog

  5. Select a classpath variable then press OK.

    • If the variable resolves to a folder, you can specify a path extension that points to a JAR. To do this press the Extend... button.

    • Press Edit... to create a new classpath variable or edit an existing one.

Hint: You can add multiple variable entries at once to the Java build path: Select more than one variable in the New Variable Classpath Entry dialog, or multiple JAR files in the Variable Extension dialog.

Related concepts

Classpath variables
Build classpath

Related tasks

Attaching source to a class path variable
Creating Java elements
Defining a class path variable
Deleting a class path variable
Viewing and editing a project's build path

Related reference
Classpath Variables preference page
Build path properties page
 

Legal notices