From owner-freebsd-java@FreeBSD.ORG Tue Apr 11 18:01:50 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 9554616A406 for ; Tue, 11 Apr 2006 18:01:50 +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 602AA43D58 for ; Tue, 11 Apr 2006 18:01:49 +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 94D6664C9 for ; Tue, 11 Apr 2006 20:01:48 +0200 (CEST) Received: by vision.anyware (Postfix, from userid 1021) id 5CD5D61AC; Tue, 11 Apr 2006 20:01:46 +0200 (CEST) Date: Tue, 11 Apr 2006 20:01:46 +0200 From: Jean-Baptiste Quenot To: java@freebsd.org Message-ID: <20060411180145.GP53974@vision.anyware> Mail-Followup-To: java@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: mutt-ng/devel-r581 (FreeBSD) Cc: Subject: 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: Tue, 11 Apr 2006 18:01:50 -0000 Hello, The Java ports infrastructure provides JAVA_HOME on build-time to port's Makefile. But is it possible to get this variable from /usr/local/bin/java at runtime? How to change the Java version for a port at runtime in the rc script? It is possible to set the preferred JDK in /usr/local/etc/javavms but then JAVA_HOME still needs to be set manually. I would like to avoid hard-coding the JAVA_HOME at build time in the rc scripts. Any idea? -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/