# Source Attachment Property Page

To browse the source of a type contained in library you can attach a source archive or source folder to this library. The editor will then show the source instead of the decompiled code. Setting the source attachment also allows source level stepping with the debugger.

The Source Attachment dialog can be reached in several ways:

- Select a JAR in the Package Explorer and choose Properties > Java Source Attachment from the context menu or the Project menu
- Open the Java Build Path page of a project (Projects > Properties > Java Build Path). On the Libraries page expand the library's node and select the Source attachment attribute and press Edit
- Open an editor on a class file. If the source attachment has not already been configured for this JAR, the editor contains a button Attach Source

Depending of how a JAR was contributed to the classpath, you can see different types of Source attachment dialogs:

## JAR

In the Path field, enter the path of an archive or a folder containing the source. Use either the Workspace, External File or the External Folder button to browse for a location.

For a source attachment in an external location you can also specify an optional Encoding for reading the source attachment. By default the workspace encoding is used.

## Variable

In the Location Variable Path field enter a variable path that points to the source attachment's location. A variable path has as first segment a variable (which will resolve to a folder or file), the rest is an optional path extension (e.g.MYVARIABLE/src.jar ). Use either the Variable button to select an existing variable and the Extension button to select the extension path. The Extension button is only enabled when the variable can be extended (resolves to a folder)

JRE_SRC is a reserved variable that points to a JRE selected in the Installed JREs preference page ( Java > Installed JREs). Go to this preference page to configure the source attachment for the JRE's library..

Build classpath

Installed JREs preferences
Java build path properties