title: How to build android project with openjdk on Ubuntu?
body: <p>I found this <a href="https://stackoverflow.com/questions/4074711/is-sun-java-really-necessary-for-using-android-sdk-on-ubuntu-10-10-i-prefer-ope">Is Sun Java really necessary for using Android SDK on Ubuntu 10.10? I prefer OpenJDK</a> but I can't build android project on Ubuntu. When I try:</p>
  
  <pre><code>$ ant debug
  </code></pre>
  
  <p>I got:</p>
  
  <pre><code>Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
  
  ...
  
  BUILD FAILED
  /home/kuba/projects/Android/android-sdk-linux/tools/ant/build.xml:651: The following error occurred while executing this line:
  /home/kuba/projects/Android/android-sdk-linux/tools/ant/build.xml:672: Unable to find a javac compiler;
  com.sun.tools.javac.Main is not on the classpath.
  Perhaps JAVA_HOME does not point to the JDK.
  It is currently set to "/usr/lib/jvm/java-6-openjdk/jre"
  </code></pre>
  
  <p>I have java version:</p>
  
  <pre><code>$ java -version
  java version "1.6.0_20"
  OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.10.1)
  OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
  </code></pre>