From: Jim Procter Date: Tue, 16 Apr 2019 16:38:18 +0000 (+0100) Subject: JAL-3130 call Jalview via the Test JVM’s JAVA_HOME/bin/java X-Git-Tag: Release_2_11_0~17^2~7^2~20^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=08c2d5fcdc3fbd94c1f8c7fcfbc8d17b58a049b0;hp=a3ab8b587ee3a4bc9e334deb14c492d3e3a307d0;p=jalview.git JAL-3130 call Jalview via the Test JVM’s JAVA_HOME/bin/java --- diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index cb08563..6454899 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -129,6 +129,8 @@ public class CommandLineOperations private static String modules = null; + private static String java_exe = null; + public synchronized static String getClassPath() { if (scanner == null) @@ -141,6 +143,9 @@ public class CommandLineOperations { modules.concat(mr.getName()); } + java_exe = System.getProperty("java.home") + File.separator + "bin" + + File.separator + "java"; + } while (classpath == null) { @@ -161,7 +166,8 @@ public class CommandLineOperations // Note: JAL-3065 - don't include quotes for lib/* because the arguments are // not expanded by the shell String classpath = getClassPath(); - String _cmd = "java " + (withAwt ? "-Djava.awt.headless=true" : "") + String _cmd = java_exe + " " + + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath " + classpath + (modules.length() > 2 ? "--add-modules=\"" + modules + "\"" : "")