diff --git a/test/RuntimeExec.java b/test/RuntimeExec.java new file mode 100644 index 0000000000..86c03299c6 --- /dev/null +++ b/test/RuntimeExec.java @@ -0,0 +1,13 @@ +import java.lang.Runtime; + +public class RuntimeExec { + public static void main(String[] args) throws java.io.IOException { + System.out.println("Executing internet explorer"); + Runtime.getRuntime().exec("\"c:\\program files\\internet explorer\\iexplore.exe\" http://www.google.com"); + System.out.println("Executing firefox"); + String[] firefox = new String[2]; + firefox[0] = "c:\\program files\\mozilla firefox\\firefox.exe"; + firefox[1] = "http://www.google.com"; + Runtime.getRuntime().exec(firefox); + } +}