title: How to stop uninterruptible threads in Java
body: <p>I have a Java application that <strong><em>I CAN'T EDIT</em></strong> that starts a <code>java.lang.Thread</code> that has this <code>run()</code> method:</p>
  
  <pre><code>public void run(){
     while(true){
       System.out.println("Something");
     }
  }
  </code></pre>
  
  <p>At a certain point in time I want to stop it. If I use <code>Thread.interrupt()</code> it doesn't work.
  If I use <code>Thread.stop()</code> it works, but this method is deprecated (so its use is discouraged as it may be removed from JVM in new releases).</p>
  
  <p>How to stop such uninterruptible threads in Java?</p>