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();
	}
	
}

  

 

posted @ 2017-01-04 22:53  穆晟铭  阅读(256)  评论(0编辑  收藏  举报