title: ant error JAVA_HOME does not point to SDK
body: <p>I am trying to install SOLR and running "ant example" The build gets pretty far but then gives an error:</p>
  
  <pre><code>/root/apache-solr-3.2.0/solr/common-build.xml:250: The following error occurred while executing this line:
  /root/apache-solr-3.2.0/lucene/contrib/contrib-build.xml:58: The following error occurred while executing this line:
  /root/apache-solr-3.2.0/lucene/common-build.xml:298: The following error occurred while executing this line:
  /root/apache-solr-3.2.0/lucene/common-build.xml:733: 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-1.6.0-openjdk-1.6.0.0.x86_64/jre"
  </code></pre>
  
  <p>I have explicity set JAVA_HOME (see below)</p>
  
  <pre><code># echo $JAVA_HOME
  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/
  </code></pre>
  
  <p>However the JAVA_HOME when I run ant is showing as
  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre instead of # echo $JAVA_HOME
  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/ . I cannot figure out where this is being set. I also set ANT_HOME as it was stated in some other posts that this might fix the issue. </p>
  
  <pre><code># echo $ANT_HOME
  /usr/share/ant/
  </code></pre>
  
  <p>That does not fix it either.</p>