java - How to find which jars and in what order are loaded by a classloader? -
I could not find any further answer to this question, so I will try here:
Is there a program (programmatic or other) to get a list of jars / classes loaded in the exact order required by a program classloader? By Application Classloader I mean Classloader that loads an EAR application in an application server (WLS, VAS, JBs ...), but obviously, it applies to any classloader.
So, to normalize, I would like to know the list and order of the JARs loaded by a specific category loader, not the individual category, which is quite easy to find by calling the Classloader .getPackages (), But a list of JAR files that were loaded by this classloader.
No short answer Classellers do not need to highlight their search logic.
However, if you have a ClassLoder installation or a subclass, you have access to the list of jars / directories, getURLs ()
method According to the doctor for this class, those URLs Will be searched in order.
In practice, if you are trying to figure out where a class is being loaded, Steve might be more helpful in answering it.
Comments
Post a Comment