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 @@
### END INIT INFO
# Attempt to locate JAVA_HOME, code borrowed from jabref package
if [ -z $JAVA_HOME ]
then
t=/usr/lib/jvm/default-java && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-7-sun && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-7-openjdk-amd64 && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-7-openjdk && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-6-openjdk-amd64 && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/java-6-openjdk && test -d $t && JAVA_HOME=$t
# Attempt to locate JAVA_HOME
if [ -z $JAVA_HOME ]; then
JAVA_HOMES="/usr/lib/jvm/default-java \
/usr/lib/jvm/java-7-sun \
/usr/lib/jvm/java-6-sun \
/usr/lib/jvm/java-1.5.0-sun \
/usr/lib/jvm/java-7-openjdk-amd64 \
/usr/lib/jvm/java-7-openjdk \
/usr/lib/jvm/java-6-openjdk-amd64 \
/usr/lib/jvm/java-6-openjdk"
for t in $JAVA_HOMES ; do
if [ -d $t ] ; then
JAVA_HOME=$t
break;
fi
done
fi
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