Skip to content

Commit

Permalink
Update prism launch script on macOS.
Browse files Browse the repository at this point in the history
Only use /usr/libexec/java_home if java is in /usr/bin.
That is the problematic case for passing DYLD_LIBRARY_PATH
and some Java installs do not work with /usr/libexec/java_home.
  • Loading branch information
davexparker committed Jan 1, 2024
1 parent b0f6d5c commit 233fddd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions prism/src/bin/prism.darwin
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ PRISM_DIR=/home/luser/prism

# Command to launch Java
if [ "$PRISM_JAVA" = "" ]; then
PRISM_JAVA=java
# On OS X, we want to avoiding calling java from the /usr/bin link
# since it causes problems with dynamic linking (DYLD_LIBRARY_PATH)
if [ -x /usr/libexec/java_home ]; then
PRISM_JAVA=`/usr/libexec/java_home`"/bin/java"
else
PRISM_JAVA=java
if $(which java | grep -q '^/usr/bin'); then
if [ -x /usr/libexec/java_home ]; then
PRISM_JAVA=`/usr/libexec/java_home`"/bin/java"
fi
fi
fi

Expand Down

0 comments on commit 233fddd

Please sign in to comment.