// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.IOException;

public class MulWin {
   public static void main(String[] args) {
      DoIt[] x = new DoIt[5];
      for(int i = 0; i < 5; i++) {
         x[i] = new DoIt();
      }
      for(int i = 0; i < 5; i++) {
         x[i].start();
      }
      for(int i = 0; i < 5; i++) {
         try {
            x[i].join();
         } catch (InterruptedException e) {
            e.printStackTrace();
         }
      }
   }
}

class DoIt extends Thread {
   public void run() {
      try {
         Runtime.getRuntime().exec("cmd /c start pause");
      } catch (IOException e) {
         e.printStackTrace();
      }
   }
}
