3

I do not think this is a duplicate. I cannot find the simple answer I am looking for.

In Eclipse (Juno), I want to highlight any single import statement and find out which jar contains that package/class.

Is this possible in Eclipse? If so, how?

EDIT

This question looks very similar, but does not answer my question How to know the jar files being used in eclipse

EDIT 2

Thank you for the answers, my problem is solved. I want to point out, however, for the edification of others, that the ctrl + shift + t solution provided by Adarshr only displayed the name of the jar when the highlighted import statement did NOT include the semicolon (;) at the end of the statement.

I was highlighting the entire package name, class name, and semicolon, and it did not display the jar name.

Community
  • 1
  • 1
Josh
  • 1,309
  • 2
  • 17
  • 37
  • I don't think this is currently available. If it is, it's new. The place I used to work for had to write a home-grown plugin to do what you are describing. – MadConan Nov 01 '13 at 18:31

2 Answers2

6

It is already possible. Just highlight the class and press Ctrl + Shift + T.

Eclipse

adarshr
  • 61,315
  • 23
  • 138
  • 167
  • 1
    Thanks for this. I had a lengthy comment to this solution, which I have included in the question as Edit 2, FYI. – Josh Nov 01 '13 at 18:54
2

Highlight the import and 'open' it (f3)... it will open the location it is sourced from, whether it is a jar or some source file.

It will (if you have your editor linked to the package navigator) also hilight the locaton in the left package tree...

rolfl
  • 17,539
  • 7
  • 42
  • 76