我試圖安裝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