gamma功能的KorSumAnalyse增加判断当前的操作系统调用程序
This commit is contained in:
parent
8063149ba5
commit
8fc1362770
|
@ -2234,9 +2234,16 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//获取当前操作系统名称并转换为小写
|
||||
String os = System.getProperty("os.name").toLowerCase();
|
||||
// 创建ProcessBuilder对象
|
||||
ProcessBuilder pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM.exe");
|
||||
ProcessBuilder pb = null;
|
||||
//如果操作系统是windows 调用KORSUM.exe程序
|
||||
if (os.contains("win")) {
|
||||
pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM.exe");
|
||||
} else { // 其他操作系统 调用KORSUM
|
||||
pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM");
|
||||
}
|
||||
// 设置工作目录
|
||||
pb.directory(new File(parameterProperties.getFilePath()));
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user