This is what I'm getting when mvn
is executed from 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.
At the same time, starting it from command line gives correct result. Why mvn
is going into this tools.jar
? Why it is ignoring my JAVA_HOME
? And how can I fix it?
I don't know what are the values of JAVA_HOME/PATH
when mvn
is started from CC. I would really love to get this information but I don't know how. CC itself is started from user cc
and env
for this user gives me (it's CentOS 5.4):
JAVA_HOME=/usr/java/default
PATH=/usr/local/maven/bin:/usr/local/bin:/bin:/usr/bin:/home/cc/bin