Date: Wed, 25 Sep 2013 08:07:35 +0200 From: Andrea Venturoli <ml@netfence.it> To: Jonathan Chen <jonc@chen.org.nz> Cc: freebsd-ports@freebsd.org Subject: Re: Multiple Java versions Message-ID: <52427DA7.8070804@netfence.it> In-Reply-To: <CAJuc1zOOz6d_AfrdMFkG0yQ11aYF882R9DXVXw53w8cR8D_-Bw@mail.gmail.com> References: <52416B1A.5040606@netfence.it> <CAJuc1zOOz6d_AfrdMFkG0yQ11aYF882R9DXVXw53w8cR8D_-Bw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/24/13 21:38, Jonathan Chen wrote: > On 24 September 2013 22:36, Andrea Venturoli <ml@netfence.it> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52427DA7.8070804>