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();
}
时间: 2024-10-14 14:33:33