Adding a classpath variable to the build path

To add a classpath variable to the Java build path of a project, follow these steps:
  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. You can Edit... New... a variable or create a new variable with New....
  5. Classpath variable dialog


  6. Press New...
  7. Enter the variable's name and path then press OK.
  8. If the variable resolves to a folder, you have to specify a path extension that points to a JAR. To do this press the Extend... button. If the variable already resolves to a JAR file you can click OK directly.
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
 

Copyright IBM Corporation 2000, 2002. All Rights Reserved.