From owner-freebsd-ports@FreeBSD.ORG Tue Sep 24 19:38:26 2013 Return-Path: Delivered-To: freebsd-ports@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 68A33EB3 for ; Tue, 24 Sep 2013 19:38:26 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail-qe0-f54.google.com (mail-qe0-f54.google.com [209.85.128.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C7442448 for ; Tue, 24 Sep 2013 19:38:25 +0000 (UTC) Received: by mail-qe0-f54.google.com with SMTP id cy11so3558624qeb.13 for ; Tue, 24 Sep 2013 12:38:19 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TB8EhpC8BP7bSNqUfGRLbpftt7ZrVTufKitAOmUvGTY=; b=aDRyaQPl3vgj1orhRr6oMq/wn/nvPc9te5hnY7tfv+jFgLNEkQ34xOIrTJwlyz/Eo6 z0Cdgt98dlUULlP6GaGc38LqXpHlTfNGZhdmpcoX4crpr+DEdtf9w4afAow8hRCx+Kys suxaScBNfeILfbp6cVJhhMJX4iJnz7ttg8rI3CbBEdQeWceURKT0qBWgDQgFRTYY32zj ON8B6xsd1pvJc7FeOjpPobl2IF9OCPbS7y2PkkZGFUxYUnpL5fjw5hslfbnVuC3UzMxV S6rJ858PmqFBSfPTFlBebztexIP/LMglPvkmIRcLHnfDl4iPk0c+LGrjB9GrzEeZhgyo teOg== X-Gm-Message-State: ALoCoQnGpKPVxUg3GTH8LACJTEl1lByYLK+V8HW1XrILzS3Nb/SGIbHRAE1lktxLDC21LhlIZmlU MIME-Version: 1.0 X-Received: by 10.229.12.197 with SMTP id y5mr38687186qcy.8.1380051499673; Tue, 24 Sep 2013 12:38:19 -0700 (PDT) Received: by 10.49.34.147 with HTTP; Tue, 24 Sep 2013 12:38:19 -0700 (PDT) X-Originating-IP: [203.99.129.1] In-Reply-To: <52416B1A.5040606@netfence.it> References: <52416B1A.5040606@netfence.it> Date: Wed, 25 Sep 2013 07:38:19 +1200 Message-ID: Subject: Re: Multiple Java versions From: Jonathan Chen To: Andrea Venturoli Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 24 Sep 2013 19:38:26 -0000 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) -- Jonathan Chen