# Attaching source to a class path variable

When attaching source for a class path variable entry, both the path to the Archive and the Root Path must be defined by variables. Follow these steps to make a source attachment for a variable:

1. Select the project, and from its pop-up menu, select Properties.
   In the Properties dialog, select the Java Build Path page.
2. On the Libraries tab, select the class path variable to which you want to attach source.
   Expand the node by clicking on the plus and select the node Source Attachment. Click the Edit button to bring up the source attachment dialog.
3. In Location variable path field, use a variable to define the location of the archive. Use the Variable button to select an existing variable and the Extension button to append an optional path extension.
4. Click OK.

Classpath variables

Adding a variable class path entry
Defining a class path variable
Deleting a class path variable

Classpath Variables preference page
Source Attachment dialog