Exemplo 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;
    }
Exemplo n.º 2
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);
    }
Exemplo n.º 3
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;
 }