Java, Maven and Gradle 25 · Diagnostics
Take a thread dump
Print every thread's stack. Useful for hangs and deadlocks.
jcmd 12345 Thread.print
Official Java, Maven and Gradle 25 documentation
More diagnostics commands
- List running Java processes
- Show heap usage
- Write a heap dump
- Dump the heap on OutOfMemoryError
- Show the flags a JVM is using
All diagnostics commands · Java, Maven and Gradle 25 cheatsheet