为什么maven会忽略我的JAVA_HOME?

yeg*_*256 3 java maven-2

这是mvn从CruiseControl执行时我得到的:

Unable to locate the Javac Compiler in:
  /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

同时,从命令行启动它会得到正确的结果.为什么mvn要进入这个tools.jar?为什么忽略我的JAVA_HOME?我该如何解决?

我不知道什么JAVA_HOME/PATH时候mvn从CC开始的值.我真的很想得到这些信息,但我不知道如何.CC本身是从用户启动的cc,env对于这个用户给我(它是CentOS 5.4):

JAVA_HOME=/usr/java/default
PATH=/usr/local/maven/bin:/usr/local/bin:/bin:/usr/bin:/home/cc/bin
Run Code Online (Sandbox Code Playgroud)

ang*_*sen 11

我遇到了同样的问题,Java JDK的简单重新安装为我解决了这个问题:

apt-get install openjdk-6-jdk