title: Get a thread by Id
body: <p>I worked in JMX java and I get all the thread IDs by using the <code>getAllThreadIds ()</code> method of the interface <code>ThreadMXBean</code> but I need a way to kill the thread of a given ID.</p>
  <p>for example:</p>
  <pre><code>ThreadMXBean tbean;
  tbean = ManagementFactory.getThreadMXBean();
  long[] IDs=tbean.getAllThreadIds();
  //.... I need a way to kill the Threads which have this IDs
  </code></pre>