# Attaching source to a JAR file

You can attach source to a JAR file to enable source-level stepping and browsing of classes contained in a binary JAR file. Unless its source code is attached to a JAR file in the workbench, you will not be able to view the source for the JAR file.

To attach source to a JAR file:

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 JAR file 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. Fill in the Location path field depending on the location, choose between the workspace, an external file or external folder.
4. Click OK.

or

1. Select the JAR file in the Package Explorer, and from its pop-up menu, select Properties.
   In the Properties dialog, select the Java Source Attachment page.
2. Fill in the Location path field depending on the location, choose between the workspace, an external file or external folder.
3. Click OK .

Java development tools (JDT)

Attaching source to variables
Creating a new JAR file
Stepping through the execution of a program

Java Build Path
Source Attachment dialog