Remove error message when start management server if JAVA_HOME is not set

This commit is contained in:
Wei Zhou 2014-12-01 13:25:00 +01:00
parent 34e8483e80
commit 449d123ce7
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ for vendorconf in "@MSCONF@"/vendor/* ; do
CLASSPATH=$vendorconf:$CLASSPATH
done
export CLASSPATH
if [[ ! -d "$JAVA_HOME" && -d /usr/lib/jvm/jre-1.7.0 ]]; then
if ([ -z "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ]) && [ -d /usr/lib/jvm/jre-1.7.0 ]; then
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0
fi
PATH=$JAVA_HOME/bin:/sbin:/usr/sbin:$PATH