From owner-freebsd-java@FreeBSD.ORG Thu Nov 3 20:50:59 2005 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 5E5A316A41F for ; Thu, 3 Nov 2005 20:50:59 +0000 (GMT) (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 D7C1C43D6E for ; Thu, 3 Nov 2005 20:50:54 +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 jA3KorsW009791; Thu, 3 Nov 2005 21:50:53 +0100 (CET) (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 jA3KoqrZ009790; Thu, 3 Nov 2005 21:50:52 +0100 (CET) (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: Thu, 3 Nov 2005 21:50:52 +0100 From: Herve Quiroz To: "[LoN]Kamikaze" Message-ID: <20051103205052.GA9619@arabica.esil.univ-mrs.fr> Mail-Followup-To: "[LoN]Kamikaze" , java@FreeBSD.org References: <436A62D5.4080809@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436A62D5.4080809@gmx.de> User-Agent: Mutt/1.4.2.1i Cc: java@FreeBSD.org Subject: Re: javawrapper.sh chooses oldest vm 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: Thu, 03 Nov 2005 20:50:59 -0000 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