java: Runtime和Process调用本机程序
java: Runtime和Process调用本机程序
调用纸牌程序,Process用来销毁程序
import java.io.IOException;
public class RunTimeDemo {
public static void main(String args[]) throws Exception
{
Runtime rt = Runtime.getRuntime();
Process pro = rt.exec("freecell.exe");
Thread.sleep(2000);
pro.destroy();
}
}
浙公网安备 33010602011771号