# Source attachments

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 a the decompiled code. Having the source attachment set the debugger can offer source level stepping in this type.

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 Location 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.

## 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