Esempio n. 1
0
    // Kills the JVM process and any active threads on it.
    private void kill() {
      if (redirectErr != null) {
        redirectErr.close();
        redirectErr.interrupt();
      }

      if (redirectOut != null) {
        redirectOut.close();
        redirectOut.interrupt();
      }

      if (JVM != null) {
        JVM.destroy();
        JVM = null;
      }

      JVMrunning = false;

      println("JVM reset on " + java.util.Calendar.getInstance().getTime().toString(), progErr);
    }
Esempio n. 2
0
 // Adds a new Thread that links a reader to a writer. Used to
 private IOHandlerThread redirectIOStream(Reader reader, TextOutputStream writer) {
   IOHandlerThread thr = new IOHandlerThread(reader, writer);
   thr.start();
   return thr;
 }