问题
I am using the Eclipse IDE and would like to debug. When I try to step into the Java code, I get a message "Source not found". With previous versions of Java like 1.5, I was able to download a src.zip file, go into the "Installed JREs" area, edit the rt.jar attribute then add the "Source Attachment". Then I am able to step into Java source. This works fine when I have the src.zip.
Is there a src.zip for Java 1.6? Has anyone successfully attached 1.5 src.zip to a 1.6 jre in Eclipse?
回答1:
Download the Java 6 JDK and install it. Add it to installed JRE's. Set it as default Java runtime.
When you debug now, you should have src.zip attached automatically.
(Note: It works differently for recent Java releases on OS X)
来源:https://stackoverflow.com/questions/7079633/attaching-java-source-for-1-6