7192916: Hotspot development launcher should use DYLD_LIBRARY_PATH on OS X

Reviewed-by: dholmes, dsamersoff, nloodin
This commit is contained in:
Staffan Larsen 2012-08-22 10:01:51 +02:00
parent 9d85b8e187
commit 6d8fa095b3

View File

@ -114,21 +114,33 @@ fi
# any.
JRE=$JDK/jre
JAVA_HOME=$JDK
ARCH=@@LIBARCH@@
export JAVA_HOME
ARCH=@@LIBARCH@@
SBP=${MYDIR}:${JRE}/lib/${ARCH}
# Set up a suitable LD_LIBRARY_PATH
# Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
OS=`uname -s`
if [ "${OS}" = "Darwin" ]
then
if [ -z "$DYLD_LIBRARY_PATH" ]
then
DYLD_LIBRARY_PATH="$SBP"
else
DYLD_LIBRARY_PATH="$SBP:$DYLD_LIBRARY_PATH"
fi
export DYLD_LIBRARY_PATH
else
# not 'Darwin'
if [ -z "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH="$SBP"
else
LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH"
fi
export LD_LIBRARY_PATH
export JAVA_HOME
fi
JPARMS="$@ $JAVA_ARGS";