Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2010 11:06:19 +0200
From:      "Osipov, Michael" <michael.osipov@siemens.com>
To:        "freebsd-java@freebsd.org" <freebsd-java@freebsd.org>
Subject:   Erratic JAVA_HOME output
Message-ID:  <BA7F2D0AAFA236469C36CDB54DE1A07DA70D7B49@DEMCHP99E24MSX.ww902.siemens.net>

index | next in thread | raw e-mail

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@siemens.com
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA7F2D0AAFA236469C36CDB54DE1A07DA70D7B49>