OSDN Git Service

am df09424f: Patch 2: some fixes to the developer-docs stylesheet.... Patch 3: add...
[android-x86/build.git] / core / find-jdk-tools-jar.sh
1 if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then
2     echo $ANDROID_JAVA_HOME/lib/tools.jar
3 else
4     JAVAC=$(which javac)
5     if [ -z "$JAVAC" ] ; then
6         echo "Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com"
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:"
14 fi