Eclipse link to external source path
I have Java project that uses a JAR from another Eclipse project (open source from apache). For debug I 开发者_Go百科need access to the source. I have no idea where to point the source path. Everything I tried fails.
All my sources are underproject/src/org/apache/...
.
Nota : it used to work but I upgraded eclipse as well as my apache project and it ain't working anymore.
Right click on the jar and open its Properties dialog, then go on Java Source Attachment page and select either Workspace..., External File... or External Folder...
If sources of that jar are in the same Workspace under some other Java project, usually you can just select that project as a source reference.
Ctrl-click on one of the classes of the library, and you'll have a page asking you to specify the source location of the class. Or right-click on the jar, choose "Properties", and then "Java Source Attachment".
Take a look at http://www.cavdar.net/2008/07/14/3-ways-of-jdk-source-code-attachment-in-eclipse/
As a brief run-down try this
- Go to Project > Properties > Java Build Path > Libraries
- Expand JRE System Library [your jre version] then, rt.jar
- Select Source attachment
- Click Edit….
- Select the source code file (External File…) and press OK.
精彩评论