Attaching Source to a Classpath Variable

When attaching source for a classpath 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 context menu, select Properties.

2.

In the Properties dialog, select the Java Build Path page.

3.

Click the Libraries tab.

4.

Select the classpath variable to which you want to attach source.

5.

Click the Attach Source button to bring up the source attachment dialog.

6.

In Archive Variable Path field, use a variable to define the location of the archive. Use the Variable button to select an existing variable and the Browse button to select the relative path.

An optional path extension can be appended to the selected variable.

7.

In the Root Variable Path field, enter a variable that stores the root path prefix of the JAR file.

Use either the Variable button to select an existing variable or the Browse button to browse the archive referenced by the variable.

8.

Click OK when you are done.