Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: displaying code source for class file?

Tags:

java

eclipse

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?

like image 849
Jason S Avatar asked Apr 13 '11 20:04

Jason S


1 Answers

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.

like image 154
ILMTitan Avatar answered Oct 16 '22 08:10

ILMTitan