title: Tools for finding all dependencies in Java jars
body: <p>Are there any tools that can be given a classpath or folder, and will search through all the .jar files looking for references to a particular class?</p>
  
  <p>It would have saved me a day of searching in order to resolve <a href="https://stackoverflow.com/questions/6043391/jboss-4-2-startup-throws-noclassdeffounderror">this kind of problem</a>.</p>
  
  <p>In my case I had to find out where a rogue reference to a class was coming from, as it was stopping JBoss from starting correctly due to a <code>NoClassDefFoundError</code>. I suppose I am looking for this:</p>
  
  <pre><code>java -jar magicbullet.jar /path/to/search com.myproject.DodgyClass
  Searching...
  com.problematic.Otherclass in /path/to/search/dodgy.jar implements com.myproject.DodgyClass
  </code></pre>
  
  <p>Or similar. If not, I'll write one.</p>