From: Ben Soares Date: Mon, 17 Dec 2018 10:37:13 +0000 (+0000) Subject: JAL-3130 java bash wrapper to choose which java to run (if this is first in path... X-Git-Tag: Release_2_11_0~17^2~7^2~58^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fd9883a5fa9cbf42bd7738beb6052bc4eb12f434;p=jalview.git JAL-3130 java bash wrapper to choose which java to run (if this is first in path) -- useful when you want javac and java to be from different JAVA_HOME when running ant --- diff --git a/j11jre/bin/java b/j11jre/bin/java new file mode 100755 index 0000000..1fff2eb --- /dev/null +++ b/j11jre/bin/java @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +OS=$(uname) + +[ -z $JRE_HOME ] && JRE_HOME=$JAVA_HOME +BASE_DIR=$(dirname ${0}) +BASE_DIR=${BASE_DIR%/bin} + +if [ -z $JRE_HOME ]; then + case $OS in + Darwin) JRE_HOME=$BASE_DIR/openjdk11_macos ;; + Linux) JRE_HOME=$BASE_DIR/openjdk11_linux ;; + esac +fi + +echo $JRE_HOME/bin/java ${@} +$JRE_HOME/bin/java ${@}