Commit eb984da0 authored by Florian Schmaus's avatar Florian Schmaus Committed by flow

OF-636 Use default-jvm if available

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13526 b35dd754-fafc-0310-a699-88a17e54d16e
parent b815c266
...@@ -20,17 +20,22 @@ ...@@ -20,17 +20,22 @@
### END INIT INFO ### END INIT INFO
# Attempt to locate JAVA_HOME, code borrowed from jabref package # Attempt to locate JAVA_HOME
if [ -z $JAVA_HOME ] if [ -z $JAVA_HOME ]; then
then JAVA_HOMES="/usr/lib/jvm/default-java \
t=/usr/lib/jvm/default-java && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-7-sun \
t=/usr/lib/jvm/java-7-sun && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-6-sun \
t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-1.5.0-sun \
t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-7-openjdk-amd64 \
t=/usr/lib/jvm/java-7-openjdk-amd64 && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-7-openjdk \
t=/usr/lib/jvm/java-7-openjdk && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-6-openjdk-amd64 \
t=/usr/lib/jvm/java-6-openjdk-amd64 && test -d $t && JAVA_HOME=$t /usr/lib/jvm/java-6-openjdk"
t=/usr/lib/jvm/java-6-openjdk && test -d $t && JAVA_HOME=$t for t in $JAVA_HOMES ; do
if [ -d $t ] ; then
JAVA_HOME=$t
break;
fi
done
fi fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin:${JAVA_HOME}/bin PATH=/sbin:/bin:/usr/sbin:/usr/bin:${JAVA_HOME}/bin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment