Attaching source to a class folder
You can attach source to a class folder to enable source-level stepping and browsing of classes contained in a class folder.
Unless its source code is attached to a class folder in the workbench, you will not be able to view the source for the class folder.
To attach source to a class folder:
-
Select the project, and from its pop-up menu, select Properties.
In the Properties dialog, select the Java Build Path page.
-
On the Libraries tab, select the class folder 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.
-
Fill in the Location path field depending on the location, choose between the workspace, an external file or external folder.
-
Click OK.
or
-
Select the class folder in the Package Explorer, and from its pop-up menu, select Properties.
In the Properties dialog, select the Java Source Attachment page.
-
Fill in the Location path field depending on the location, choose between the workspace, an external file or external folder.
-
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