Show TOC

 Setting Classpath VariablesLocate this document in the navigation structure

Use

A classpath variable is a name-path pair.

The pathof the classpath variable shows:

  • The current path to the directory from which several classpaths of the J2EE application start or
  • The directory which contains resources used, by the application.

The name of the classpath variable is used in the Project Options and Classpath Managementwindows for a fast reference to the classpath variable.

The classpath variables are useful for projects that you move from one location to another. In this case, you should only change the path of the classpath variable with the new location.

Procedure
  1. Choose Project → Options.The Project Optionswindow appears.
  2. Choose the Classpathtab and choose Change.TheClasspath Managementwindow appears.
  3. Choose Variables. The Classpath Variables window appears.
  4. To add a new variable:
    1. Set the name and path for the variable in the Variable Name and Variable Pathfields.You can set arbitrary Variable Name. Select a Variable Pathfrom the file system.
    2. Choose Add.

If you do not use the Addbutton, but directly click on the OK button, the classpath variable will not be set.

  1. To remove a variable from the list, select it and click the Removebutton.
  2. To close the Classpath Managementwindow and confirm your changes, click the OK button.
Example

If you set var1 in Variable Name column and C:\develop in Variable Path column, the C:\develop\new project Java classpath folder will appear in the Classpath Managementwindow as {var1}\new .