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

Commit dba13c9

Browse files
committed
check output of '/usr/libexec/java_home' whether it's a directory or foo (no java found, etc...)
1 parent 3e64c74 commit dba13c9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ if [ -n "$JAVA_HOME" ] ; then
186186
JAVACMD="$JAVA_HOME/bin/java"
187187

188188
# otherwise check "/usr/libexec/java_home" symlinks
189-
elif [ -x /usr/libexec/java_home ]; then
190-
JAVACMD="`/usr/libexec/java_home`/bin/java"
189+
elif [ -x /usr/libexec/java_home ] && [ -d "`/usr/libexec/java_home 2> /dev/null`" ] ; then
190+
JAVACMD="`/usr/libexec/java_home 2> /dev/null`/bin/java"
191191

192192
# otherwise check Java standard symlink (old Apple Java)
193193
elif [ -h /Library/Java/Home ]; then

0 commit comments

Comments
 (0)