Merge "Fix Java detection on some Linux distributions"

This commit is contained in:
Ying Wang 2014-10-16 20:58:36 +00:00 committed by Gerrit Code Review
commit 4e3e9ffbf3

View file

@ -2,7 +2,13 @@
if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then
echo $ANDROID_JAVA_HOME/lib/tools.jar
else
JAVAC=$(which javac)
JAVAC=$(realpath $(which javac) 2>/dev/null)
if [ -z "$JAVAC" ]; then
JAVAC=$(readlink -f $(which javac) 2>/dev/null)
fi
if [ -z "$JAVAC" ]; then
JAVAC=$(which javac)
fi
if [ -z "$JAVAC" ] ; then
exit 1
fi