Can I kill a java thread from JDB?
•
Java
In theory, JDB (@l)u 419)u 0@ debugger) allows you to kill a single thread In practice, is it possible? Here, I attach JDB to my JVM, which has an agentlib on port 8000:
$jdb -attach 8000 >
I listed the topics:
> threads Group system: (java.lang ... [...]
I found the thread in question and tried to kill it:
> kill 0x21bb new java.lang.Exception("die!") killing thead: pool-766-thread-1 > com.sun.tools.example.debug.expr.ParseException: Unable to create java.lang.Exception instance Expression must evaluate to an object
So threads can't be killed?
How to create a new exception in JDB and let it kill the thread?
Solution
The following answer on so seems to be just enforcing your problem
But the following answer may indeed answer your question
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
二维码