X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandLineOperations.java;h=9d8a99329a5a9219eb0cb2f9399887a549262ffe;hb=0ccb42e83189e8ce1682af2885f5a44be0f260ea;hp=cb08563639e6331ae249452fd55f5a9a5cde9609;hpb=397492a5c6d3bf851eb1689af32af03df7790eb8;p=jalview.git diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index cb08563..9d8a993 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 + "\"" : "") @@ -204,7 +210,6 @@ public class CommandLineOperations Path currentRelativePath = Paths.get(""); String s = currentRelativePath.toAbsolutePath().toString(); System.out.println("Test CWD is " + s); - System.err.println("Test CWD is " + s); } catch (Exception q) { q.printStackTrace();