How to kill a java thread using VisualVM or using a unix command?

后端 未结 8 1116
耶瑟儿~
耶瑟儿~ 2021-01-31 04:30

I m using windows 7 OS. I have around 6 threads in my application. For the purpose of testing the alerts to check the health of the threads, i need to kill the thre

8条回答
  •  时光取名叫无心
    2021-01-31 05:11

    It's not true. You can always attach to the JVM process with GDB and do a call pthread_kill if you know the thread id. You only need to translate from the java thread dump (do a kill -3) which gives you a hex id, (native id), then look into the list of threads in GDB (info threads) and locate the real thread id.

    This is proven to work.

提交回复
热议问题