- jcmd: One JDK Command-Line Tool to Rule Them All
- Determining the Active HotSpot Garbage Collector
- Programmatic jcmd Access
- JavaOne 2012: Diagnosing Your Application on the VM
After numerous years of developing with Java, it’s my opinion that the classloader is the source of some of the most difficult defects encountered during development and debugging. Given this observation and given my interest in
jcmd, I am very interested in JDK-8203682 [“Add jcmd ‘VM.classloaders’ command to print out class loader hierarchy, details”].
The “Description” for JDK-8203682 states, “It would be helpful, as a complement to VM.classloader_stats, to have a command to print out the class loader hierarchy and class loader details.” In other words, this command to be added to
jcmd would include display of classloaders in hierarchical fashion similar to that which classes are displayed by
jcmd‘s VM.class_hierarchy command.
JDK-8203682 shows its “Status” as “Resolved” and its “Fix Version” as “11“. JDK-8203682 contains three text file attachments that depict the output of
jcmd <pid> VM.classloaders: example-with-classes.txt, example-with-classes-verbose.txt, and example-with-reflection-and-noinflation.txt. Additional information is available in the announcement of the change set and in the change set itself.
When dealing with classloader-related issues in Java, any details can be helpful. The addition of the
VM.classloaders command to
jcmd will make this command-line tool even more valuable and insightful.
|Published on Java Code Geeks with permission by Dustin Marx, partner at our JCG program. See the original article here: [JDK 11] Class Loader Hierarchy Details Coming to jcmd|
Opinions expressed by Java Code Geeks contributors are their own.