在eclipse中设置$JAVA_HOME但ANT找不到Java编译器
我将此行添加到 /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"
我应该做什么?
谢谢
I add this line to /home/{user}/.bashrc
file:
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
but when I want to run an ant file in eclipse got this error:
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"
what should I do?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
转到首选项/java/已安装的jre
->添加新的 jre 并选择 jre/jdk 的位置
go to preferences / java / installed jre's
-> add a new jre and select the location of your jre/jdk