I have a Java thread:
class MyThread extends Thread { @Override public void run() { BufferedReader stdin = new BufferedReader(new InputStream
Have you tried:
Thread myThread = new MyThread(); myThread.start(); // your code. myThread.interrupt();
The interrupt method will throw an InterrupedtException and you can handle the code after that.