# first check system variable "$JAVA_HOME" -> has precedence over any other System JVM stub_logger '[JavaSearch] Checking for $JAVA_HOME ...' if [ -n "$JAVA_HOME" ] ; then stub_logger "[JavaSearch] ... found JAVA_HOME with value $JAVA_HOME"
# PR 26: Allow specifying "$JAVA_HOME" relative to "$AppPackageFolder" #which allows for bundling a custom version of Java inside your app! if [[ $JAVA_HOME == /* ]] ; then #if"$JAVA_HOME" starts with a Slash it's an absolute path JAVACMD="$JAVA_HOME/bin/java" else # otherwise it's a relative path to "$AppPackageFolder" JAVACMD="$AppPackageFolder/$JAVA_HOME/bin/java" fi JAVACMD_version=$(get_comparable_java_version $(get_java_version_from_cmd "${JAVACMD}")) else stub_logger "[JavaSearch] ... didn't found JAVA_HOME" fi