From: Ben Soares Date: Wed, 28 Jun 2023 13:55:48 +0000 (+0100) Subject: JAL-3820 add java and java.exe from JAVAHOME to list of likely JVMs X-Git-Tag: Release_2_11_4_0~199^2~8^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e5d038fc1bfc07d3879ef57f7726c60617988965;p=jalview.git JAL-3820 add java and java.exe from JAVAHOME to list of likely JVMs --- diff --git a/src/jalview/bin/Launcher.java b/src/jalview/bin/Launcher.java index ef50c91..c333e2e 100644 --- a/src/jalview/bin/Launcher.java +++ b/src/jalview/bin/Launcher.java @@ -96,13 +96,14 @@ public class Launcher final String javaBinDir = System.getProperty("java.home") + File.separator + "bin" + File.separator; String javaBin = null; - if (javaBin == null && checkJVMSymlink(javaBinDir + appName)) + for (String name : new String[] { appName, "Jalview", "java", + "java.exe" }) { - javaBin = javaBinDir + appName; - } - if (javaBin == null && checkJVMSymlink(javaBinDir + "Jalview")) - { - javaBin = javaBinDir + "Jalview"; + if (checkJVMSymlink(javaBinDir + name)) + { + javaBin = javaBinDir + name; + break; + } } if (javaBin == null) {