mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Implemented Runtime.exec(String) and Runtime.exec(String[]) and added test class
This commit is contained in:
parent
856935acc2
commit
3f0e8a9777
13
test/RuntimeExec.java
Normal file
13
test/RuntimeExec.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user