2011-03-14 109 views
5

我此行添加到/home/{user}/.bashrc文件:

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk 

但是當我要運行在Eclipse的Ant文件得到這個錯誤:

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" 

我該怎麼辦?

感謝

+0

不要忘記投票了答案,如果它幫助你 – 2011-03-14 10:13:32

回答

9

去喜好/ JAVA /安裝JRE的 - >添加新的JRE,並選擇您的JRE的位置/ JDK

+1

它的工作原理,但如果我將ANT jar文件添加到jre/jdk,它會給出相同的錯誤 – Shahryar 2011-03-14 10:18:49

+2

- > windows/preferences/ant/runtime - >添加jar – 2011-03-14 10:20:34

相關問題