Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Java Development User Guide
Previous Page Home Next Page

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 a 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:


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.


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 Opens the Installed JRE preference page Java > Installed JREs ). Go to this preference page to configure the source attachment for the JRE's library..

Related concepts

Build classpath

Related reference

Installed JREs preferences
Java build path properties

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire