title: Terminate unresponsive thread
body: <p>I have built a java application and have a thread thats doing something in the background when a button was pressed. The problem is, that thread might lock up, perhaps due to an infinite loop. Is there a way I can force terminate that thread?</p>
  
  <p>EDIT: I am using LuaJ on the java platform. It has the potential of locking up and I don't really have much control over it apart from running it in another thread and killing it when either java or the script is finished.</p>