Package java.lang

Examples of java.lang.Runtime.exec()


      ieStr = "\"c:\\program files\\internet explorer\\iexplore.exe\" http://www.google.com";
    } else {
      System.out.println("Executing Firefox using string");
      ieStr = "firefox http://www.google.com";
    }
    Process ie = runtime.exec(ieStr);
   
    if(System.getProperty("os.name").equals("windows")){
      System.out.println("Executing firefox");
      firefox[0] = "c:\\program files\\mozilla firefox\\firefox.exe";
      firefox[1] = "http://www.google.com";
View Full Code Here


    } else {
      System.out.println("Executing Firefox using array");
      firefox[0] = "firefox";
      firefox[1] = "http://www.google.com";
    }
    Process ff = runtime.exec(firefox);

    boolean ffSuccess = false;
    boolean ieSuccess = false;
    while(!(ieSuccess && ffSuccess)){
      if(!ffSuccess){
View Full Code Here

      charmapStr = "c:\\windows\\system32\\charmap.exe";
    } else {
      System.out.println("Executing and waiting for firefox");
      charmapStr = "firefox http://www.google.com";
    }
    Process cm = runtime.exec(charmapStr);
    System.out.println("Exit value: " + cm.waitFor());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.