title: Java: How do I know which jar file to use given a class name?
body: <p>Given a class, <a href="http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/views/navigator/ResourceNavigator.html" rel="noreferrer">org.eclipse.ui.views.navigator.ResourceNavigator</a> 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 find that out?</p>
  
  <p><strong>Edit</strong>: Thank you to all of you who answered. Like many things, there seems to be several ways to skin this cat. I wish javadoc contained this info. So far here are the different methods:</p>
  
  <ol>
  <li><p>Without Internet, Eclipse or NetBeans:</p>
  
  <pre><code>for f in `find . -name '*.jar'`;  do echo $f &amp;&amp; jar tvf $f | grep -i $1; done
  </code></pre></li>
  <li><p>If you want to find out locally using Eclipse:</p>
  
  <ul>
  <li><a href="http://www.alphaworks.ibm.com/tech/jarclassfinder" rel="noreferrer">JAR Class Finder Plug-in</a></li>
  <li><a href="http://classlocator.sourceforge.net/" rel="noreferrer">Class Locator Plug-in</a></li>
  </ul></li>
  <li><p>If you want to find out from Internet or you do not have the jar yet:</p>
  
  <ul>
  <li><a href="http://www.jarfinder.com/" rel="noreferrer">jarFinder</a></li>
  <li><a href="http://findjar.com/" rel="noreferrer">findjar.com</a></li>
  </ul></li>
  </ol>