开发者

Eclipse: displaying code source for class file?

I'm running Eclipse 3.5.2 and am debugging a class which calls a method -- let's call it flaky() -- in one of my other .jar 开发者_开发技巧files. When I step into flaky(), it shows the source code in a tab in the debugger, with the filename as Flaky.class.

The problem is, the code I see looks old and out of date, so I'm wondering which file I'm looking at.

Is there any way to find out the path of the file Eclipse is displaying?


Go to the Package Explorer view with the file open in the current editor. Click the "Link with Editor" toggle (the two arrows). This should jump you to the class file you are viewing, which should be in the jar you are using. If the jar is in a library, you should see the path to the jar in the package explorer. If not you can see the path to it in the preferences. From there you can also use Chin Huang's answer to find where the given source file is.


View the Properties for the JAR file. Under Java Source Attachment, you will see where Eclipse gets the source code for classes in the JAR file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜