Thread dump programmatically /JDI (Java Debugger Interface)

前端 未结 4 1561
野的像风
野的像风 2020-12-05 21:41

I like to generate a thread dump programmatically. I\'ve learned that there a basically two ways to do it:

  1. Use the \"Java Virtual Machine Tool Interface\" JVM-
4条回答
  •  死守一世寂寞
    2020-12-05 21:52

    You can get just about all the Thread info you need including deadlocks from http://java.sun.com/javase/6/docs/api/java/lang/management/ThreadMXBean.html

提交回复
热议问题