JAL-3820 add java and java.exe from JAVAHOME to list of likely JVMs
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 28 Jun 2023 13:55:48 +0000 (14:55 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 28 Jun 2023 13:55:48 +0000 (14:55 +0100)
src/jalview/bin/Launcher.java

index ef50c91..c333e2e 100644 (file)
@@ -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)
     {