summaryrefslogtreecommitdiffstats
path: root/core/find-jdk-tools-jar.sh
blob: 091eae46772cdc3d1753e30988b79e3ec7e26fc0 (plain)
1
2
3
4
5
6
7
8
9
10
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)
    while [ -L $JAVAC ] ; do
        LSLINE=$(ls -l $JAVAC)
        JAVAC=$(echo -n $LSLINE | sed -e "s/.* -> //")
    done
    echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:"
fi