我试图安装SOLR和运行“蚂蚁例如”构建得到相当远,但随后给出了一个错误:蚂蚁错误JAVA_HOME没有指向SDK
/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"
我必须明确地设置JAVA_HOME(见下文)
# echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/
然而,当我运行蚂蚁显示为 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre代替#的JAVA_HOME回声$ JAVA_HOME 在/ usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 /。我无法弄清楚在哪里设置。我还设置了ANT_HOME,因为在其他一些帖子中提到这可能会解决问题。
# echo $ANT_HOME
/usr/share/ant/
这并没有解决它。
如果运行java.home会显示什么内容:ant -diagnostics | grep java.home – 2011-06-08 21:18:50
你应该为你的问题添加一个linux metatag。 – djangofan 2011-10-26 20:00:03
我有这个确切的问题。你能解决它吗? – Clarkey 2011-11-04 09:55:53