I used the VM options -verbose:class
, however it just print the successed loaded class, like below:
[Loaded com.sun.tools.javac.jvm.ClassReader$AnnotationCompleter from file:/C:/Program%20Files/Java/jdk1.7.0_71/lib/tools.jar]
[Loaded javax.lang.model.element.ElementKind from C:\Program Files\Java\jdk1.7.0_71\jre\lib\rt.jar]
[Loaded com.sun.tools.javac.code.Flags from file:/C:/Program%20Files/Java/jdk1.7.0_71/lib/tools.jar]
however it didn't print the information when it failed to load the class, also it didn't print which class loader cannot get the class in a certain place.
what I needed is a similar options like IBM JVM options "-Dibm.cl.verbose" , which not only print the successful loaded file, but also print which class loader loaded the class, and which place it searched.
http://www.ibm.com/developerworks/java/library/j-dclp1/index.html
I have no idea if hotspot have a similar VM options or other ways to print more detail loading information like -Dibm.cl.verbose
.