From owner-freebsd-ports@FreeBSD.ORG Wed Sep 25 06:07:51 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2712586F for ; Wed, 25 Sep 2013 06:07:51 +0000 (UTC) (envelope-from ml@netfence.it) Received: from smtp.eutelia.it (mp1-smtp-2.eutelia.it [62.94.10.162]) by mx1.freebsd.org (Postfix) with ESMTP id A46AA29AF for ; Wed, 25 Sep 2013 06:07:49 +0000 (UTC) Received: from ns2.biolchim.it (ip-188-188.sn2.eutelia.it [83.211.188.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eutelia.it (Eutelia) with ESMTP id 0F95FD6C4B for ; Wed, 25 Sep 2013 08:07:46 +0200 (CEST) Received: from soth.ventu (adsl-ull-109-216.41-151.net24.it [151.41.216.109]) (authenticated bits=0) by ns2.biolchim.it (8.14.7/8.14.7) with ESMTP id r8P67foD013918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 25 Sep 2013 08:07:43 +0200 (CEST) (envelope-from ml@netfence.it) X-Authentication-Warning: ns2.biolchim.it: Host adsl-ull-109-216.41-151.net24.it [151.41.216.109] claimed to be soth.ventu Received: from alamar.ventu (alamar.ventu [10.1.2.18]) by soth.ventu (8.14.7/8.14.5) with ESMTP id r8P67Z0M011030; Wed, 25 Sep 2013 08:07:36 +0200 (CEST) (envelope-from ml@netfence.it) Message-ID: <52427DA7.8070804@netfence.it> Date: Wed, 25 Sep 2013 08:07:35 +0200 From: Andrea Venturoli User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Jonathan Chen Subject: Re: Multiple Java versions References: <52416B1A.5040606@netfence.it> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (ns2.biolchim.it [192.168.2.203]); Wed, 25 Sep 2013 08:07:43 +0200 (CEST) X-Scanned-By: MIMEDefang 2.74 Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Sep 2013 06:07:51 -0000 On 09/24/13 21:38, Jonathan Chen wrote: > On 24 September 2013 22:36, Andrea Venturoli wrote: > [...] >> Now, according to JAVAVMS(5), "By default, javavm will select the most >> ``native'' and up to date version". >> >> However: >> >>> % java -version >>> openjdk version "1.6.0_32" >>> OpenJDK Runtime Environment (build 1.6.0_32-b27) >>> OpenJDK Server VM (build 20.0-b12, mixed mode) >> >> >> Any way to fix this? >> >> AFAICT I didn't set any relevant environment variable, anything in >> /etc/make.conf or in javavms' own config files. > > JAVA_HOME is what you need: > > jonathan:~,7:36am> unsetenv JAVA_HOME > jonathan:~,7:36am> 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) > jonathan:~,7:36am> setenv JAVA_HOME /usr/local/openjdk7 > jonathan:~,7:36am> 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) > Ok, fine for me. I'd just point out: isn't it in contrast to what the man page says (i.e. "By default, javavm will select the most ``native'' and up to date version")? Should the docs be corrected then? bye & Thanks av.