Angus Lees | 4cf7606 | 2009-01-30 10:17:23 +0000 | [diff] [blame] | 1 | if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2 | echo $ANDROID_JAVA_HOME/lib/tools.jar |
| 3 | else |
| 4 | JAVAC=$(which javac) |
Rod Whitby | 3caa7cf | 2008-10-22 11:49:14 +1030 | [diff] [blame] | 5 | if [ -z "$JAVAC" ] ; then |
Ying Wang | b368bba | 2010-07-07 18:12:25 -0700 | [diff] [blame] | 6 | echo "Please-install-JDK-6,-which-you-can-download-from-java.sun.com" |
Rod Whitby | 3caa7cf | 2008-10-22 11:49:14 +1030 | [diff] [blame] | 7 | exit 1 |
| 8 | fi |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 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 |