Get a list of all threads currently running in Java

后端 未结 13 1457
[愿得一人]
[愿得一人] 2020-11-22 02:30

Is there any way I can get a list of all running threads in the current JVM (including the threads not started by my class)?

Is it also possible to get the

13条回答
  •  伪装坚强ぢ
    2020-11-22 03:10

    Have you taken a look at jconsole?

    This will list all threads running for a particular Java process.

    You can start jconsole from the JDK bin folder.

    You can also get a full stack trace for all threads by hitting Ctrl+Break in Windows or by sending kill pid --QUIT in Linux.

提交回复
热议问题