使用awt的Desktop类的open方法:
public static void startExe(String exePath){ try { if(StringUtils.isNotBlank(exePath)){ Desktop.getDesktop().open(new File(exePath)); //exePath为exe路径 } } catch (Exception e){ e.printStackTrace(); }
用于自动化测试前期的初始化操作,或exe运行