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

后端 未结 8 1262
耶瑟儿~
耶瑟儿~ 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:26

    You can't do it from outside (OS or debugger), you'll have to write your own Thread watchdog that can interact with the user and kill the thread you want.

    Try to look here for how to handle signals with java

提交回复
热议问题