Home » Java » Core Java » [JDK 11] Class Loader Hierarchy Details Coming to jcmd

About Dustin Marx

Dustin Marx

[JDK 11] Class Loader Hierarchy Details Coming to jcmd

I’ve been a fan of the diagnostic command-line tool jcmd since hearing about jcmd at JavaOne 2012. I’ve used this tool extensively since then and have blogged multiple times about this tool:

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.

(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of