From ff1dd4e580de0b101e35f148388e5b891d7ba79d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 17 Sep 2018 11:39:00 +0100 Subject: [PATCH 1/1] discover java home path --- src/jalview/util/Worker.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jalview/util/Worker.java b/src/jalview/util/Worker.java index 68f4174..ff7f0a9 100644 --- a/src/jalview/util/Worker.java +++ b/src/jalview/util/Worker.java @@ -1,6 +1,7 @@ package jalview.util; import java.io.BufferedReader; +import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; @@ -119,7 +120,10 @@ public class Worker extends Thread // 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 javahome = System.getProperty("java.home"); + + String _cmd = javahome + File.pathSeparator + "java " + + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath " + classpath + " " + javaArgs + " jalview.bin.Jalview "; Process ls2_proc = null; -- 1.7.10.2