this.setAppJavaHome(app);// ����JAVA_HOME
List<String> allList = ProcessTookit.getIProcessManager().getPIDByName(Constants.SERVER_RUN_TYPE_JAVAW + Constants.EXE);
String cmdCommand = ProcessTookit.getIProcessManager().getCommand(app);
Process process = Runtime.getRuntime().exec(cmdCommand);
ProcessInfo info = new ProcessInfo();
info.setProcess(process);
info.setStartTime(TimeUtil.getCurDateTime());
Thread.sleep(1000);
List<String> newList = ProcessTookit.getIProcessManager().getPIDByName(Constants.SERVER_RUN_TYPE_JAVAW + Constants.EXE);
newList.removeAll(allList);
FileUtil.remove(Global.batPath + File.separator + app.getId() + Constants.APP_BAT_TYPE);// ɾ����ʱ�ű�
if (newList.size() == 0) {
throw new Exception("������!");
} else {
info.setPid(newList.get(0));
info.setAppId(app.getId());
Global.AppProcess.put(app.getId(), info);
app.setState(Application.RUNNING);
}
ConfigMamager.getReader().modifyApp(app);
}