标签:des style io sp java on bs ef size
java调用exe的几种方法
Runtime rt = Runtime.getRuntime();
try
{
java.awt.Desktop.getDesktop().open(new File("E:\\XML2XLS\\circlegrid.exe"));
//rt.exec("E:\\XML2XLS\\circlegrid.exe");
//rt.exec(new String[]{"cmd","/c","E:\\XML2XLS\\circlegrid.exe"});
//rt.exec("\"E:\\XML2XLS\\circlegrid.exe\"");
//rt.exec("cmd /c E:\\XML2XLS\\circlegrid.exe \f"); // \f前面有没有空格一样,去掉\f也没有影响,cmd
}
catch (IOException e)
{
e.printStackTrace();
}
标签:des style io sp java on bs ef size
原文地址:http://www.cnblogs.com/jhsx/p/4122505.html