Date: Wed, 19 Apr 2006 02:43:31 +0200 From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> To: freebsd-java@freebsd.org Subject: Re: Getting JAVA_HOME at runtime Message-ID: <20060419004331.GA82761@arabica.esil.univ-mrs.fr> In-Reply-To: <20060418084857.GA1715@vision.anyware> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060419004331.GA82761>