Given a class, org.eclipse.ui.views.navigator.ResourceNavigator for example, how do I find out which jar file to use? I know it\'s in org.eclipse.ui.ide, but how would I fin
Also check http://javacio.us/.
**shell> find . -name "*.jar" | xargs -i -t \jar tvf {} | grep [TheClassNameYouAreLookingFor]**
For example, if you are looking for a class LogFactory.class on list of apache commons jars, below command would work
shell> find apache-commons/ -name "*.jar" | xargs -i -t \jar tvf {} | grep LogFactory.class
jar tvf apache-commons/commons-beanutils-1.7.0.jar
jar tvf apache-commons/commons-fileupload-1.2.1.jar
jar tvf apache-commons/commons-lang-2.3.jar
**jar tvf apache-commons/commons-logging-1.1.jar**
**21140 Tue May 09 23:08:12 EDT 2006 org/apache/commons/logging/LogFactory.class**
jar tvf apache-commons/commons-net-1.3.0.jar
The above result indicates that the match is commons-logging-1.1.jar
IntelliJ IDEA plugin (Class Hunter)
if you tell eclipse to open a declaration (F3) or implementation (Navigate->Open Implementation) and you get popped into an un-editable edit window, you can see the path to the jar file by right-clicking the editor window and choosing 'show in breadcrumbs'
my find unix based:
find . -name "*.jar" -print -exec jar -tf {} \; >outputfile
edit output file to find what you want (instead of grep)
I'm not sure I really understand the question, but if you're looking to verify that your class is really in the jar, you can always look through the jar itself, and for that you don't need any Eclipse plugins or specialized external application.
JAR (Java ARchive) files are nothing more than ZIP files. All you have to do is unzip the jar, or even view it using a zip-reading application. Under Windows XP, for example, this comes built into the operating system. How convenient.
Hope this helped...
Yuval =8-)
I use FindJar.com. It lists all known packages that contain any given class! It's incredibly helpful.