# Defining a classpath variable

Classpath variables are stored global to the workbench; in other words, all projects in the workbench can share the classpath variables.

To add or change a class path variable, follow these steps:

1. From the menu bar, select Window > Preferences.
   Select the Java > Build Path > Classpath Variables page.
2. This page allows you to add, edit, or remove class path variables.
   - To add a new class path variable, click the New... button. The New Variable Entry page opens.
   - To edit an existing class path variable, select the variable in the Defined class path variables list and click the Edit... button. The Edit Variable Entry page opens. Note: The reserved class path variables, JRE_LIB, JRE_SRC, and JRE_SRCROOT cannot be edited in this page. To change them, change the default workbench JRE on the Installed JREs page (Window > Preferences > Java > Installed JREs).
   Type a name for the variable in the Name field.
3. Type a path to be referenced by the variable in the Path field. You can also click the File or Folder buttons to browse the file system.
4. Click OK when you are done. The new or modified variable appears in the Defined class path variables list on the Preferences page.

Classpath variables

Adding a variable class path entry
Attaching source to a class path variable
Creating Java elements
Deleting a class path variable

Classpath Variables preference page