title: Set $JAVA_HOME in eclipse but ANT Cannot Find Java Compiler
body: <p>I add this line to <code>/home/{user}/.bashrc</code> file:</p>
  
  <pre><code> export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
  </code></pre>
  
  <p>but when I want to run an ant file in eclipse got this error:</p>
  
  <pre><code>BUILD FAILED
  /home/bakish/Work/new/hadoop-0.20.2/build.xml:316: 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>what should I do?</p>
  
  <p>Thanks</p>