How to change Eclipse's "associated source" for debugging?
I have a jar file that supplies some classes in my development environment. When I'm debugging in Eclipse, when I first step into a class supplied by that jar, Eclipse prompts me 开发者_开发知识库to give the location of the associated source files. I do so, and everything's fine.
Some time later, I replace the jar with a newer version. How can I instruct Eclipse to look in a different place for the newer source?
Right click on the Debugger panel, select Edit Source Lookup
In the Project Explorer (or Navigator), find the JAR (should be listed under "library path"), right-click, properties, there you can delete the association to a source, and/or provide a new association.
Note: you must go to the properties for an individual JAR. You cannot get the equivalent dialog if you click on "JRE System Library"
In the package explorer, where the jar is in a library (JRE, Maven dependencies, etc...); right click => properties => java source attachement.
Alternately in the project properties => Java build path => Library tab => select the jar => edit.
精彩评论