Posted by Unknown
Friday, February 27, 2009

Create a java file with following code

//File Shell.java"

import java.io.*;
import java.lang.Runtime;

public class Shell {
public static void main(String[] args) throws IOException {

Runtime rt = Runtime.getRuntime();
Process p = rt.exec("cmd /c start ping www.google.com");
//Object p can use for controliing Process
//Example p.destroy(); kill the process

}
}

0 comments