Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 4a93c1d

Browse files
committed
Bugfix for JVMVersion key present but no JVMs in /usr/libexec/java_home
1 parent f05c9ec commit 4a93c1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/universalJavaApplicationStub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ if [ -n "$JAVA_HOME" ] ; then
217217
JAVACMD="$JAVA_HOME/bin/java"
218218

219219
# check for specified JVMversion in "/usr/libexec/java_home" symlinks
220-
elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] ; then
220+
elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then
221221

222222
if /usr/libexec/java_home -F -v ${JVMVersion}; then
223223
JAVACMD="`/usr/libexec/java_home -F -v ${JVMVersion} 2> /dev/null`/bin/java"
@@ -229,7 +229,7 @@ elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] ; then
229229
fi
230230

231231
# otherwise check "/usr/libexec/java_home" symlinks
232-
elif [ -x /usr/libexec/java_home ] && [ -d "`/usr/libexec/java_home 2> /dev/null`" ] ; then
232+
elif [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then
233233
JAVACMD="`/usr/libexec/java_home 2> /dev/null`/bin/java"
234234

235235
# otherwise check Java standard symlink (old Apple Java)

0 commit comments

Comments
 (0)