I am trying to list the order in which the Java class loader is loading my classes. if I use -verbose parameter it will list every single interface/class it loads, including tons of interfaces such as Serializable, exceptions etc. Is there a way to tweak this output so it only shows which classes are loaded in the class my main method is defined?
I am trying to list the order in which the Java class loader is
Share
I guess your best bet is to do the following:
mainmethod starts and right before it ends.There’s a similar question and some answers here: Is there a way to get which classes a ClassLoader has loaded?
Did you try
-verbose:class?