From owner-freebsd-java@FreeBSD.ORG Wed Sep 25 19:09:27 2013 Return-Path: Delivered-To: java@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id BB646AB7; Wed, 25 Sep 2013 19:09:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <5243343F.4020200@FreeBSD.org> Date: Wed, 25 Sep 2013 15:06:39 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Gary Aitken , 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> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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:09:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-09-25 14:54:13 -0400, 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. Because java/openjdk6 is the default Java for FreeBSD ATM. If you want to force openjdk7 for some reason, you just have to set JAVA_VERSION, e.g., % java -version openjdk version "1.6.0_32" OpenJDK Runtime Environment (build 1.6.0_32-b27) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) % env JAVA_VERSION=1.7 java -version openjdk version "1.7.0_25" OpenJDK Runtime Environment (build 1.7.0_25-b15) OpenJDK 64-Bit Server VM (build 23.21-b01, mixed mode) Please see javavm(1) for more information, i.e., "man javavm". > 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. Please note /usr/local/etc/javavms is never ordered by user preference, *intentionally*. > However, you can avoid this behavior and get the right thing by > setting JAVAVM_FALLBACK_ONLY=1 It is normally unnecessary. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBAgAGBQJSQzQ/AAoJEHyflib82/FGEacH/iQh2YXQ5w/6OP+crwRK8xr7 jxckXVBog4CVfnF+RHjHKJ9ByYlVjBZCLzMeMLFSdPDfKS9K0vHPR6AQVOBPQhz0 Rakgzxw8ocoxXZcHwo0mWu7rNvJJJUt+QOjraeQcbGa5JhXgTwH5j1hVG3iPeVD7 YNaE1id9cp/RJ4sMLMJ99PQgDDWRky9WX/H+axNm/DfwouwcR2oAkYeeIA5WfsDF mQQYgiAf6oWQMPMqT94Ml/AhsA3UD8yQ+T6hJOeSqkWpSxtfCdkNi+6icndzshEz iIRkzY3IDf/Hb3nBX4oQz9J0Tj0PxL3P00ZBxJi8bYZavsd8C6caT4ZwPGngwYE= =d9xb -----END PGP SIGNATURE-----