Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2013 15:15:14 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Gary Aitken <vagabond@blackfoot.net>,  Andrea Venturoli <ml@netfence.it>
Cc:        java@freebsd.org, Jason Helfman <jgh@freebsd.org>, FreeBSD Ports List <freebsd-ports@freebsd.org>
Subject:   Re: Multiple Java versions
Message-ID:  <52433642.2070301@FreeBSD.org>
In-Reply-To: <524334A0.8030407@blackfoot.net>
References:  <52416B1A.5040606@netfence.it>	<CAJuc1zOOz6d_AfrdMFkG0yQ11aYF882R9DXVXw53w8cR8D_-Bw@mail.gmail.com>	<52427DA7.8070804@netfence.it> <CAMuy=%2Bi=-DE3XUe=XP5eaYM6a9c09z0UsQP=-up7-x1LkXpNWQ@mail.gmail.com> <524284CB.4050606@netfence.it> <52433155.3070900@blackfoot.net> <524334A0.8030407@blackfoot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-09-25 15:08:16 -0400, Gary Aitken wrote:
> On 09/25/13 12:54, Gary Aitken wrote:
>> On 09/25/13 00:38, Andrea Venturoli wrote:
>>> On 09/25/13 08:28, Jason Helfman wrote:
>>> 
>>>> java/javavmwrapper
>>>> 
>>>> cc: java
>>> 
>>> Sorry for being so dumb, but I don't understand this... I
>>> though I was using javavmwrapper... what do you mean?
>> 
>> I believe you are correct in your original statement, and that
>> there is something wrong with the java startup script.
>> 
>> You do not need to set JAVA_HOME. The startup script has code to
>> locate all installed versions, set JAVA_HOME if not already set, 
>> prioritize them, and execute the latest one; but it doesn't seem
>> to be working properly.
>> 
>> There is no javavmwrapper, at least in my installation(s). The
>> java startup script (/usr/local/bin/java) indicates it is itself 
>> javawrapper.sh.
>> 
>> If JAVA_HOME is not set, the startup script finds a java by using
>> make, and that finds openjdk6 when openjdk6 and openjdk7 are both
>> installed. In this case, the script is not using the installed
>> prioritization list in /usr/local/etc/javavms.  It seems to me it
>> should be checking this before resorting to what make finds.
>> 
>> However, you can avoid this behavior and get the right thing by
>> setting JAVAVM_FALLBACK_ONLY=1
> 
> My mistake. It is operating as advertised, although I think it's
> crazy that bsd.java.mk should be choosing openjdk6 over openjdk7.
> 
> But if what you want is the prioritization set in
> /usr/local/etc/javavms,

No, it is NOT the place for preference as I said earlier.  In fact, it
has (almost) no user serviceable part in it.

> then you want to set JAVAVM_FALLBACK_ONLY instead of JAVA_HOME

No, it seems JAVA_VERSION is what you want.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSQzZBAAoJEHyflib82/FGCNsH/1VrZUM4iPH9EzVEk+FBEZU/
BEdqDg1CWxYAKlOaGB3RY5Lt9WlkIUVU6ydkLLe8fdWrwTu8V8F24SEPClQ63cY6
7cibKdI38vKR4kvONXX4GHULJVVW9CB7gEXalGAlnF5msSS2gwGjw639MUxjRzNl
5y2j/WWXkx8uBSmBHlCK3Orwy5QS1zxLH/dqz9jG07i4LC0ne6PRnE7pikHf3DN6
6C+Wx/xm3fzrhJhP23sXwDMSdJxxPEDC4++jugiHe74QFJlGzCrZpScw5uBicJ4X
hqHsTiwEFtAUd8Aw7kjxrkqof4e1935wYXxPjrldKOXcRig9FEeEkv2hrJPnWNQ=
=6BEh
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52433642.2070301>