Java调用外部exe程序
时间:2010-09-23 来源:PerSector
用java调用.exe程序的方法:
public class Demo{
public static void main(String args[]){
Runtime rn = Runtime.getRuntime();
Process p = null;
String exeFile = "";
try{
exeFile = "D:\\EditPlus 2\\editplus.exe";
p = rn.exec(exeFile);
}catch( Exception e ){
System.out.println( " ERROR exec Editplus.exe " );
}
}
}
相关阅读 更多 +