Java threads: determine which threads are still running

For debugging purposes, I want to find out which threads of my program are still running It appears that one or more threads were unexpectedly not interrupted Some beautiful printable format will be a reward

Solution

Jvisualvm is your friend for such debugging It is located in the / bin directory of the JDK installation Displays all threads as a graphical view and gives you insight into what they are doing The thread dump button prints out all current stack traces so that you can see if something is stuck somewhere in the user code

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>