From: Jim Procter Date: Mon, 17 Sep 2018 10:39:00 +0000 (+0100) Subject: discover java home path X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=ff1dd4e580de0b101e35f148388e5b891d7ba79d;p=jalview.git discover java home path --- 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;