From 08c2d5fcdc3fbd94c1f8c7fcfbc8d17b58a049b0 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 16 Apr 2019 17:38:18 +0100 Subject: [PATCH] =?utf8?q?JAL-3130=20call=20Jalview=20via=20the=20Test=20JVM?= =?utf8?q?=E2=80=99s=20JAVA=5FHOME/bin/java?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/jalview/bin/CommandLineOperations.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 + "\"" : "") -- 1.7.10.2