From owner-freebsd-java@FreeBSD.ORG Wed Apr 19 00:43:39 2006 Return-Path: X-Original-To: freebsd-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 4D23A16A400 for ; Wed, 19 Apr 2006 00:43:39 +0000 (UTC) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5B2B43D5E for ; Wed, 19 Apr 2006 00:43:33 +0000 (GMT) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost [127.0.0.1]) by arabica.esil.univ-mrs.fr (8.13.4/8.13.4) with ESMTP id k3J0hWsJ082851 for ; Wed, 19 Apr 2006 02:43:32 +0200 (CEST) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: (from rv@localhost) by arabica.esil.univ-mrs.fr (8.13.4/8.13.4/Submit) id k3J0hVlK082850 for freebsd-java@freebsd.org; Wed, 19 Apr 2006 02:43:31 +0200 (CEST) (envelope-from herve.quiroz@esil.univ-mrs.fr) X-Authentication-Warning: arabica.esil.univ-mrs.fr: rv set sender to herve.quiroz@esil.univ-mrs.fr using -f Date: Wed, 19 Apr 2006 02:43:31 +0200 From: Herve Quiroz To: freebsd-java@freebsd.org Message-ID: <20060419004331.GA82761@arabica.esil.univ-mrs.fr> Mail-Followup-To: freebsd-java@freebsd.org References: <20060411180145.GP53974@vision.anyware> <20060411222343.GA55418@arabica.esil.univ-mrs.fr> <20060412180028.GB29790@vision.anyware> <20060415004125.GA57315@arabica.esil.univ-mrs.fr> <20060417102456.GA37686@watt.intra.caraldi.com> <20060417184123.GA23044@misty.eyesbeyond.com> <20060418084857.GA1715@vision.anyware> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060418084857.GA1715@vision.anyware> User-Agent: Mutt/1.4.2.1i 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, 19 Apr 2006 00:43:39 -0000 On Tue, Apr 18, 2006 at 10:48:58AM +0200, Jean-Baptiste Quenot wrote: > > Unfortunately I don't have a good solution to that at the > > moment. It almost seems like we want a flag or environment > > variable that tells javavmwrapper to dump what it found out > > rather than actually executing anything. > > That would be interesting, but can you confirm that the JDK lookup > algorithm is implemented both in bsd.java.mk and in javavm? We > might want to unify both, for example bsd.java.mk should use the > wrapper. Actually, I don't think having bsd.java.mk using the wrapper would be simple. javavmwrapper is installed as a port, and bsd.java.mk is part of the ports system. That's why we chose to implement things the exact opposite way. The JDK choosing algorithm is only implemented in bsd.java.mk. It picks a suitable JDK (according to version, vendor, etc) amongst the ones in ports. bsd.java.mk also handles the case when no JDK is suitable and finds out which one should be installed. javavmwrapper, OTOH, uses the logic from bsd.java.mk (not reimplementing it) to pick a port that is *already* installed via the ports. But javavmwrapper also handles JVMs registered in ${PREFIX}/etc/javavms and will take user-set JAVA_HOME into consideration. Back to the original topic (finding out JAVA_HOME), I had already thought of a quick hack to get javavm displaying JAVA_HOME. I think I can provide a patch for this feature if needed. Herve