1#!/bin/sh 2if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then 3 echo $ANDROID_JAVA_HOME/lib/tools.jar 4else 5 JAVAC=$(which javac) 6 if [ -z "$JAVAC" ] ; then 7 exit 1 8 fi 9 while [ -L "$JAVAC" ] ; do 10 LSLINE=$(ls -l "$JAVAC") 11 JAVAC=$(echo -n "$LSLINE" | sed -e "s/.* -> //") 12 done 13 echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:" 14fi 15