From owner-freebsd-java@FreeBSD.ORG Wed Sep 25 19:08:38 2013 Return-Path: Delivered-To: java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3AD56822; Wed, 25 Sep 2013 19:08:38 +0000 (UTC) (envelope-from vagabond@blackfoot.net) Received: from nightmare.dreamchaser.org (nightmare.dreamchaser.org [12.32.44.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 072B42C16; Wed, 25 Sep 2013 19:08:35 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [12.32.36.73]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id r8PJ8GUG025640; Wed, 25 Sep 2013 13:08:17 -0600 (MDT) (envelope-from vagabond@blackfoot.net) Message-ID: <524334A0.8030407@blackfoot.net> Date: Wed, 25 Sep 2013 13:08:16 -0600 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130730 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrea Venturoli Subject: Re: Multiple Java versions References: <52416B1A.5040606@netfence.it> <52427DA7.8070804@netfence.it> <524284CB.4050606@netfence.it> <52433155.3070900@blackfoot.net> In-Reply-To: <52433155.3070900@blackfoot.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [12.32.36.65]); Wed, 25 Sep 2013 13:08:19 -0600 (MDT) Cc: java@freebsd.org, FreeBSD Ports List , Jason Helfman X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 19:08:38 -0000 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, then you want to set JAVAVM_FALLBACK_ONLY instead of JAVA_HOME