问题
I have a prebuilt jar under my project's libs folder to speed up build-time. However, I would like to browse the lib's source when navigating into one of its contained classes, so thus added the following line to .classpath:
<classpathentry kind="lib" path="libs/mylib.jar" sourcepath="/MyLibSrc"/>
Where MyLibSrc contains the source for mylib.jar. When I navigate into one of the lib's classes, Eclipse opens the corresponding .class file instead of the .java file. How can I set to open the .java file under MyLibSrc? There are times when I may actually want to edit the .java file when navigating to it.
回答1:

Just right click on your project, go to properties and under source tab in java build path add your Java files of your Jar.. Should work like that.. try both the options.. forgot which one used to work.. did it long back.. all the best
来源:https://stackoverflow.com/questions/12203584/how-can-i-navigate-to-a-java-file-instead-of-a-class-file-with-sourcepath-spec