1

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.

DimaSan
  • 12,264
  • 11
  • 65
  • 75
Jason
  • 1,115
  • 14
  • 25
  • http://stackoverflow.com/questions/1432180/is-there-a-way-to-get-which-classes-a-classloader-has-loaded ? –  Oct 22 '16 at 09:51
  • @RC, no , I already mentioned the option -verbose:class, however it print very limited information, what I needed is like the IBM JVM options "-Dibm.cl.verbose" in hotspot – Jason Oct 22 '16 at 09:53
  • In the linked question someone answered "-verbose" –  Oct 22 '16 at 11:30
  • The question linked by RC does not answer the specific question being asked here. To my knowledge, there is no HotSpot equivalent to `-Dibm.cl.verbose`. – Brett Kail Oct 27 '16 at 10:33

0 Answers0