Adding a classpath variable to the build path
To add a classpath variable to the Java build
path of a project, follow these steps:
-
Select the project to which you want to add the classpath variable
- From the project's pop-up menu, select Properties
-
In the Properties page, select the Java Build Path page.
-
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....
-
Press New...
- Enter the variable's name and path then press OK.
- 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.
Classpath variables
Build classpath
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
Classpath Variables preference page
Build path properties page