From owner-freebsd-java@FreeBSD.ORG Wed Apr 12 18:00:30 2006 Return-Path: X-Original-To: java@freebsd.org Delivered-To: freebsd-java@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFAFA16A403 for ; Wed, 12 Apr 2006 18:00:30 +0000 (UTC) (envelope-from jbq@anyware-tech.com) Received: from caraldi.com (195-13-58-165.oxyd.net [195.13.58.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id AACFD43D49 for ; Wed, 12 Apr 2006 18:00:29 +0000 (GMT) (envelope-from jbq@anyware-tech.com) Received: from vision.anyware (10.21.96-84.rev.gaoland.net [84.96.21.10]) by caraldi.com (Postfix) with ESMTP id 92D6F6497 for ; Wed, 12 Apr 2006 20:00:28 +0200 (CEST) Received: by vision.anyware (Postfix, from userid 1021) id DBD1F61EB; Wed, 12 Apr 2006 20:00:28 +0200 (CEST) Date: Wed, 12 Apr 2006 20:00:28 +0200 From: Jean-Baptiste Quenot To: java@freebsd.org Message-ID: <20060412180028.GB29790@vision.anyware> Mail-Followup-To: java@freebsd.org References: <20060411180145.GP53974@vision.anyware> <20060411222343.GA55418@arabica.esil.univ-mrs.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060411222343.GA55418@arabica.esil.univ-mrs.fr> User-Agent: mutt-ng/devel-r581 (FreeBSD) Cc: Subject: Re: Getting JAVA_HOME at runtime X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 18:00:30 -0000 * Herve Quiroz: > In /usr/local/bin/javavm, line 447: > > export JAVA_HOME > tryJavaCommand "${JAVA_HOME}/bin/${IAM}" "${@}" > > So indeed, JAVA_HOME is set accordingly to the JVM picked up by the > script. > > That's how the launcher shell script works for devel/maven2 for example. OK, but imagine that the target application has a shell script that needs JAVA_HOME. There are plenty of programs that are based on JAVA_HOME instead of the java binary. How to get the preferred JAVA_HOME? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/