For debugging purposes, I want to figure out which threads of my program are still running. There's seems to be one or more threads that accidentally were not interrupted. Some sort of nice printable format would be a bonus.
Use 'jps' command line tool to see active java processes and jstack for showing active threads.
jstack doc
example
jVisualVM is your friend for this kind of debugging. It's in the /bin directory of your JDK install. Shows all of the threads as a graph view and allows you to drill down into what they're doing. The Thread Dump button will print out all of their current stack traces so you can see if something is stuck somewhere in your user code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With