Posted in 面试题 onJuly 04, 2015
可以用一下代码来调用外部的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
}
}
}
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
}
}
}
Java如何调用外部Exe程序
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@