I google the solution for killing a java thread. And there exists two solutions:
But both of them ar
In theory, you could call the deprecated Thread.stop()
method. But beware that this could result in your application behaving in unexpected and unpredictable ways ... depending on what the third party library is actually doing. Thread.stop()
and friends are fundamentally unsafe.
The best solution is to modify the 3rd-party library to respond to Thread.interrupt. If you cannot, then ditch it and find / use a better library.