Reputation: 363
I have a Java project in Eclipse with quite a lot of third-party libraries. Now I am looking for a way to get from the import statement to the corresponding .jar in my "Referenced Libraries" section.
My import statements look like this:
import org.xml.sax.*;
Currently, to find out which .jar this came from, I need to open them all (in the Eclipse Package Explorer) and check which of them contains this path of org/xml etc. This is quite annyoing, so I am wondering if there is a better way? Can I
improve my imports to make them more readable?
somehow "jump" from the import statement to the referenced .jar with some nice Eclipse method?
I tried to find some information on this in the www, but either there is none or my search terms were wrong.
Upvotes: 1
Views: 3582
Reputation: 111217
If you open a class file (one way is to press F3 on the class) you can then use 'Show In > Package Explorer' (or 'Project Explorer') in the right-click menu to show the class in the explorer view - the view will then show you which jar contains the class.
Upvotes: 2