Date: Thu, 3 Nov 2005 21:50:52 +0100 From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> To: "[LoN]Kamikaze" <LoN_Kamikaze@gmx.de> Cc: java@FreeBSD.org Subject: Re: javawrapper.sh chooses oldest vm Message-ID: <20051103205052.GA9619@arabica.esil.univ-mrs.fr> In-Reply-To: <436A62D5.4080809@gmx.de> References: <436A62D5.4080809@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 03, 2005 at 08:19:49PM +0100, [LoN]Kamikaze wrote: > Why is it that of all available choices the java vm wrapper script will > always choose to use the oldest available version. I've got 1.4.2 and > 1.5.0 installed and if I don't set any variables the script will always > choose 1.4.2 no matter into which order I put the entries in > /usr/local/etc/javavms . > Also if I set JAVA_VERSION="1.5.0 1.4.2" or "1.4.2 1.5.0", the script > will always choose 1.4.2 . Wouldn't it be more sensible to use the > latest available vm if not specified differently, or the first one > mentioned if possible? I am not into this RTFM thing but here is a small excerpt from the manpage for javavm(1): JAVA_VERSION A space delimited list of versions of the Java VM that may be used. By appending a `+' to a version, any Java VM with a ver- sion greater than or equal to the given version will be used. Currently allowed versions are `1.1', `1.1+', `1.2', `1.2+', `1.3', `1.3+', `1.4', `1.4+', `1.5' and `1.5+'. So your JAVA_VERSION value is wrong. Furthermore, javavm(1) uses the logic from bsd.java.mk to pick up a JDK. As you may read from this file, java/jdk14 is the default JDK on all 5.x and later systems. Hence it is not the oldest JVM that gets picked up but rather java/jdk14 if present. Even if you had java/jdk13 installed, java/jdk14 would still be picked up. You may however override this default using JAVA_PREFERRED_PORT. For instance, you may set this into /etc/make.conf: JAVA_PREFERRED_PORTS?= JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5 Herve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051103205052.GA9619>