From owner-freebsd-java@FreeBSD.ORG Thu Jan 27 20:02:09 2005 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B0A516A4CE for ; Thu, 27 Jan 2005 20:02:09 +0000 (GMT) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF81543D48 for ; Thu, 27 Jan 2005 20:02:07 +0000 (GMT) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost.esil.univ-mrs.fr [127.0.0.1])j0RK26iN011647 for ; Thu, 27 Jan 2005 21:02:06 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: (from rv@localhost) by arabica.esil.univ-mrs.fr (8.13.1/8.13.1/Submit) id j0RK265t011646 for freebsd-java@FreeBSD.ORG; Thu, 27 Jan 2005 21:02:06 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) X-Authentication-Warning: arabica.esil.univ-mrs.fr: rv set sender to herve.quiroz@esil.univ-mrs.fr using -f Date: Thu, 27 Jan 2005 21:02:06 +0100 From: Herve Quiroz To: freebsd-java@FreeBSD.ORG Message-ID: <20050127200206.GA11547@arabica.esil.univ-mrs.fr> Mail-Followup-To: freebsd-java@FreeBSD.ORG References: <20050127182853.GA94844@osiris.chen.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050127182853.GA94844@osiris.chen.org.nz> User-Agent: Mutt/1.4.2.1i Subject: Re: Which javac is being used? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2005 20:02:09 -0000 On Fri, Jan 28, 2005 at 07:28:54AM +1300, Jonathan Chen wrote: > On Thu, Jan 27, 2005 at 02:05:46PM +0800, Jiawei Ye wrote: > > On my server, both JDK14 and JDK15 are installed. I can select proper > > javavm by setting $JAVA_HOME, but only the 1.4 javac is used when I > > invoke 'javac'. > > The /usr/local/bin/java shell script inspects /usr/ports/bsd.java.mk > for the default JVM to use. You have to set the JAVA_VERSION > environment variable to force it to pick the one you want to use. That's true. But what intrigues me is the fact that both 'java' and 'javac' should use the same logic to pick a JDK (afterall they are both symlinks of the same 'javavm' file). Hence whichever JDK is chosen, 'javac -version' and 'java -version' would output the same version number... I'll try to see if I can reproduce the same error as you Jiawey, once the java/jdk15 build is done on my box (if I don't lack free HD space until then). But in the mean time, here are my quick two cents: Is it possible that you use an alias javac->jikes with some JIKES_BOOTCLASSPATH (or equivalent) set to /usr/local/jdk1.4.2/... Jiawei, could you try running the same commands but undefining JAVA_* beforehand (and just with JAVA_VERSION=1.5 as suggested by Jonathan)? Herve