1.0 用java調(diào)用windows系統(tǒng)的exe文件,比如notepad,calc之類: public class Demo{ public static void main(String args[]){ Runtime rn=Runtime.getRuntime(); PRocess p=null;
try{ p=rn.exec(notepad); }catch(Exception e){ System.out.println("Error exec notepad"); } } } 2.0調(diào)用其他的可執(zhí)行文件,例如:自己制作的exe,或是下載安裝的軟件 public class Demo{ public static void main(String args[]){ Runtime rn=Runtime.getRuntime(); Process p=null;