From owner-freebsd-java@FreeBSD.ORG Wed Sep 25 06:28:35 2013 Return-Path: Delivered-To: java@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 D9268B30 for ; Wed, 25 Sep 2013 06:28:35 +0000 (UTC) (envelope-from bsd-src@helfman.org) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B134D2A74 for ; Wed, 25 Sep 2013 06:28:35 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id r10so5652821pdi.14 for ; Tue, 24 Sep 2013 23:28:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Y0gEVi8z2Kk/X/jQ7uA4VdQx1lLpegxOUcvzmY9DUzs=; b=QG0SZNw+4pGNNL/XVJYpI/SeJfKBqL3JPZpR9vsXRSCEv8EDilzdVemTtijiW82yg2 ZBcI6egLu01hcuz5F2/IwD7doZEls2hfdVOlRZ1slSdr/QCGVWvfiWkaVaSmh9gVbTJA +fG2vqFppxFp23BGQys1gWexiYHUjYy/TUmWm34SvzvE9yxES0ZEA0j+EblnMkyevfAK 5XLntvwCU0IJ43EmUHHkwQrqq9XSBkxlsG8sqSHq3L9dYSw75MGu30IcNVWVu/BvNauh mDyx6/O80uqGme5E7i2bWoFcKYomoMYeVC2LY5Bignr5ccH99G8Jt2v4AgV0pgOcGjea Oqog== X-Gm-Message-State: ALoCoQkitxkV4l43LZ/OXBXsX8XMFp151X4mUwh27HvNqPNpdcxoUU298BGhppsNIgbggXnLhB9V MIME-Version: 1.0 X-Received: by 10.68.190.229 with SMTP id gt5mr3081029pbc.177.1380090509205; Tue, 24 Sep 2013 23:28:29 -0700 (PDT) Sender: bsd-src@helfman.org Received: by 10.70.100.165 with HTTP; Tue, 24 Sep 2013 23:28:29 -0700 (PDT) In-Reply-To: <52427DA7.8070804@netfence.it> References: <52416B1A.5040606@netfence.it> <52427DA7.8070804@netfence.it> Date: Tue, 24 Sep 2013 23:28:29 -0700 X-Google-Sender-Auth: O7hIdpHAQQfqHHJsdhPMQ4gSU-8 Message-ID: Subject: Re: Multiple Java versions From: Jason Helfman To: Andrea Venturoli Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: java@freebsd.org, FreeBSD Ports List 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 06:28:36 -0000 On Tue, Sep 24, 2013 at 11:07 PM, Andrea Venturoli wrote: > 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. The docs may need clarification, however you may want to look into using: java/javavmwrapper cc: java -jgh -- Jason Helfman | FreeBSD Committer jgh@FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve