Commit 5bc80bc3 authored by Daryl Herzmann's avatar Daryl Herzmann Committed by akrherz

improve JAVA_HOME detection, refs OF-589


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13355 b35dd754-fafc-0310-a699-88a17e54d16e
parent 95deec0a
......@@ -20,13 +20,16 @@ case "`uname`" in
fi
;;
Linux*) linux=true
jdks=`ls -r1d /usr/java/j*`
for jdk in $jdks; do
if [ -f "$jdk/bin/java" ]; then
JAVA_HOME="$jdk"
break
fi
done
if [ -z "$JAVA_HOME" ]; then
shopt -s nullglob
jdks=`ls -r1d /usr/java/j* /usr/lib/jvm/* 2>/dev/null`
for jdk in $jdks; do
if [ -f "$jdk/bin/java" ]; then
JAVA_HOME="$jdk"
break
fi
done
fi
;;
esac
......
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