可以用一下代码来调用外部的EXE程序:
public class JavaInvokeExe
{
public static void main(String args[])
{
Runtime rt = Runtime.getRuntime();
Process p = null;
String exeFilePath = “”;
try{
exeFilePath = “D:/sample.exe”;
p = rm.exec(exeFilePath);
}catch(Exception e)
{
//TODO do something here
}
}
}