我将此行添加到/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 :(得分:9)
转到preferences / java / installed jre - >添加一个新的jre并选择jre / jdk的位置