modify RunningCommand

This commit is contained in:
nisihara1 2017-05-17 21:57:40 +09:00
parent 0288812847
commit 94735b6231
1 changed files with 10 additions and 7 deletions

View File

@ -228,14 +228,17 @@ public class RunningCommand {
}
if ((!hasCommand) && Environments.isWindows()) {
File file2 = new File(path_, command0 + ".exe");
try {
if (file2.isFile()) {
command0 = file2.getPath();
hasCommand = true;
for (String ext : new String[] { ".exe", ".EXE" }) {
File file2 = new File(path_, command0 + ext);
try {
if (file2.isFile()) {
command0 = file2.getPath();
hasCommand = true;
break;
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}