Erratic JAVA_HOME output

Osipov, Michael michael.osipov at siemens.com
Fri May 7 09:29:05 UTC 2010


Hi folks,

We are running on FreeBSD 7.2 and installed the Diablo 1.6 JDK. We installed Maven 2.2.1 from the ports system and it constantly fails running since the JAVA_HOME is incorrect.

It all began with an error during the maven installation that we have set JAVA_HOME manually. Indeed we did in the /etc/profile for running other apps like Nexus and the removed the setting then.

Maven reports:
$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 19:16:01+0000)
Java version: 1.6.0_07
Java home: /usr/local/diablo-jdk1.6.0/jre
Default locale: de_DE, platform encoding: ISO8859-1
OS name: "freebsd" version: "7.2-release-p7" arch: "i386" Family: "unix"

Maven need a JDK run compile apps. Setting JAVAVM_DRYRUN says:
$ java
JAVA_HOME=/usr/local/diablo-jdk1.6.0
JAVAVM_CONF=/usr/local/etc/javavms
JAVAVM_OPTS_CONF=/usr/local/etc/javavm_opts.conf
JAVAVM_PROG=/usr/local/diablo-jdk1.6.0/bin/java
JAVAVM_OPTS=
JAVAVM_COMMAND=/usr/local/diablo-jdk1.6.0/bin/java

Then I wrote a litle test app:
public class JavaHomeInfo {
	public static void main(String... args) {
		System.out.println(System.getProperty("java.home"));
	}
}

And the output is:
$ java JavaHomeInfo
/usr/local/diablo-jdk1.6.0/jre

I am not able to compile anything with :-(

What spot did I miss?
Every config param seems to be correct.

Thanks
-- 
Mit freundlichem Gruß / Best regards

Michael Osipov

Siemens AG
Sector Industry, I DT IT LD Bln (Werkstudent)
mailto:michael.osipov at siemens.com


More information about the freebsd-java mailing list