From 94735b623136f8ec1b2becb4842ea23f9d2153a8 Mon Sep 17 00:00:00 2001 From: nisihara1 Date: Wed, 17 May 2017 21:57:40 +0900 Subject: [PATCH] modify RunningCommand --- src/burai/run/RunningCommand.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/burai/run/RunningCommand.java b/src/burai/run/RunningCommand.java index 8f08ca1..ec314a8 100644 --- a/src/burai/run/RunningCommand.java +++ b/src/burai/run/RunningCommand.java @@ -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(); } } }