Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 30731 invoked from network); 9 Mar 2005 08:12:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Mar 2005 08:12:56 -0000 Received: (qmail 22239 invoked by uid 500); 9 Mar 2005 08:12:50 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 22186 invoked by uid 500); 9 Mar 2005 08:12:49 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 22171 invoked by uid 99); 9 Mar 2005 08:12:49 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp.volantis.com (HELO mail.volantis.com) (213.86.197.2) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 09 Mar 2005 00:12:48 -0800 Received: squid 10.20.30.27 from 10.20.30.21 10.20.30.21 via HTTP with MS-WebStorage 6.0.6249 Received: from c-jabley by squid; 09 Mar 2005 08:12:44 +0000 Subject: RE: Building Java code with a different version From: James Abley To: Ant Users List In-Reply-To: <2E69174CC51C8B4F9EA2C82131176F9CF95F8D@cbr03m001.prod.atonet.gov.au> References: <2E69174CC51C8B4F9EA2C82131176F9CF95F8D@cbr03m001.prod.atonet.gov.au> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1110355964.31356.2.camel@c-jabley> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 09 Mar 2005 08:12:44 +0000 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Wed, 2005-03-09 at 04:43, Perkins, Kristian wrote: > I think the point to make is that the same JDK will be used regardless > of the values of build.compiler or compiler attribute, but the > difference will be in the compiled classes that are outputted, that is > setting compiler to javac1.4 will generate class files compatible with > java version 1.4 and later. If you want to compile your code under a > different JDK than the $JAVA_HOME JDK then set fork="true" and set the > executable attribute to where ever the executable is of the external > java compiler is. > As per the example in the manual: "If you want to run the javac compiler of a different JDK, you should tell Ant, where to find the compiler and which version of JDK you will be using so it can choose the correct command line switches. The following example executes a JDK 1.1 javac in a new process and uses the correct command line switches even when Ant is running in a Java VM of a different version: " James --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org