Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to explore which classes are loaded from which JARs?
    text
    copied!<p>Is there a way to determine which classes are loaded from which jars at runtime?</p> <p>I'm sure we've all been in JAR hell before. I've run across this problem a lot troubleshooting <code>ClassNotFoundException</code>s and <code>NoClassDefFoundError</code>s on projects. I'd like to avoid finding all instances of a class in jars and using process of elimination on the code causing a CNFE to find the culprit.</p> <p>Will any profiling or management tools give you this kind of information?</p> <p>This problem is super annoying purely because we should have this information at the time the class gets loaded. There has to be a way to get to it, or record it and find it, yet I know of nothing that will do this, do you?</p> <p>I know OSGi and versioned bundles/modules aim to make this a non issue... but it doesnt seem to be going away any time soon. :)</p> <p>NOTE: I found this <a href="https://stackoverflow.com/questions/139534/classloader-issues-how-to-determine-which-library-versions-jar-files-are-load">question</a> is a subset of my question related to classes loaded from versioned jars.</p> <p><strong>Update</strong>: Somewhat related, this post explains a strategy to search for a class within jars (either under the current directory) or in your M2_REPO. <a href="https://stackoverflow.com/questions/759923/jarscan-scan-all-jar-files-in-all-subfolders-for-specific-class">JarScan, scan all JAR files in all subfolders for specific class</a></p> <p><strong>Update 2</strong>: Also somewhat related, <a href="http://docs.jboss.org/tattletale/developerguide/en/html_single/" rel="nofollow noreferrer">JBoss Tattletale</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload