Date: Wed, 19 Apr 2006 16:59:05 +0200 From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> To: freebsd-java@freebsd.org Subject: Re: Getting JAVA_HOME at runtime Message-ID: <20060419145905.GA20044@arabica.esil.univ-mrs.fr> In-Reply-To: <20060419134041.GF35777@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> <20060419004331.GA82761@arabica.esil.univ-mrs.fr> <20060419134041.GF35777@vision.anyware>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jean-Baptiste, On Wed, Apr 19, 2006 at 03:40:41PM +0200, Jean-Baptiste Quenot wrote: > > javavmwrapper, OTOH, uses the logic from bsd.java.mk (not > > reimplementing it) to pick a port that is *already* installed > > via the ports. > > You're right, but if it can't read bsd.port.mk, javavm tries to > find the JDK itself from line 465 to line 573, that's why I say we > have two implementations of the lookup algorithm. Indeed. Moreover, as you said, javavm only does this specific lookup if there is no bsd.port.mk. No need to have this logic within bsd.java.mk, because if there is no bsd.port.mk, there is eventually no bsd.java.mk. :) > I'm attaching a patch to add documentation to javavm, and to allow > for a JAVAVM_DRY_RUN environment variable that makes javavm find > the best suitable JVM and print the corresponding value of > JAVA_HOME instead of executing it. [...] > +# Environment variables affecting the behaviour of this program: > +# > +# > +# JAVA_HOME > +# > +# Allows to choose the preferred JVM > +# > +# > +# JAVA_VERSION > +# > +# Allows to choose a preferred JVM version I don't think it's worth it to list those variables here as there is already a man page for javavm(1) which is quite detailed on the subject (and it explains the other variables, such as JAVA_OS and JAVA_VENDOR). > +# JAVAVM_DRY_RUN > +# > +# When set, find the best suitable JVM and print the corresponding value of > +# JAVA_HOME instead of executing it This info is useful, but it should rather be added directly to the manpage when we're done implementing the feature. The patched javavm works fine for me (I tested the latest version). Herve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060419145905.GA20044>