In theory, the JDB (java debugger) allows for a single thread to be killed. In practice, is it possible? Here I attach jdb to my JVM, which has an agentlib at port 8000:
$ jdb -attach 8000
>
I list the threads:
> threads
Group system:
(java.lang ...
[...]
I find the thread in question and try 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 cannot be killed?
How can one create a new Exception in the jdb, to give it to the thread to die?