javawrapper.sh chooses oldest vm

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

javawrapper.sh chooses oldest vm

Dominic Fandrey
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?

greetings
- Kamikaze

signature.asc (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: javawrapper.sh chooses oldest vm

Herve Quiroz-2
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
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"