You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Better search algorithm for specified Java version & switch to /bin/bash // refs #35
since the bash on Mac OS X is v3 and cannot `declare -A` an associative key/value array, the approach for finding the highest matching java version is to first check `/usr/libexec/java_home -v XXX` and use this (because it always returns the latest matching java version) and only if the Oracle or Apple JRE plugins contain an even higher matching java version, this will be used.
tests are passing with setup as described in #35
# use this compatible version only if the above returned empty or if the version number is higher
394
+
if [ -z${JAVACMD} ] || [ ${this_java_ver}-ge${JAVACMD_version} ] ;then
395
+
JAVACMD="${apple_jre_plugin}"
396
+
JAVACMD_version=${this_java_ver}
397
+
fi
398
+
fi
376
399
377
-
else
400
+
if [ -z"$JAVACMD" ] ;then
378
401
# display human readable java version (#28)
379
402
java_version_hr=`echo ${JVMVersion}| sed -E 's/[0-9]\.([0-9+*]+)/ \1/g'| sed "s/+/ ${MSG_JAVA_VERSION_OR_LATER}/"| sed "s/*/ ${MSG_JAVA_VERSION_LATEST}/"`
0 commit comments