ant error JAVA_HOME no apunta a SDK

Estoy intentando instalar SOLR y ejecuto "ant example". La compilación llega bastante lejos pero luego da un error:

/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"

Tengo explicity set JAVA_HOME (ver abajo)

# echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/

Sin embargo, JAVA_HOME cuando ejecuto ant se muestra como /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre en lugar de # echo $ JAVA_HOME /usr/lib/jvm/java-1.6. 0-openjdk-1.6.0.0.x86_64 /. No puedo entender dónde se está configurando esto. También configuré ANT_HOME como se dijo en otras publicaciones que esto podría solucionar el problema.

# echo $ANT_HOME
/usr/share/ant/

Eso tampoco lo arregla.

Respuestas a la pregunta(1)

Su respuesta a la pregunta