Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 82462 invoked from network); 7 Jan 2004 13:42:19 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Jan 2004 13:42:19 -0000 Received: (qmail 45147 invoked by uid 500); 7 Jan 2004 13:42:07 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 45088 invoked by uid 500); 7 Jan 2004 13:42:07 -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 45063 invoked from network); 7 Jan 2004 13:42:06 -0000 Received: from unknown (HELO 137100.vserver.de) (62.75.137.100) by daedalus.apache.org with SMTP; 7 Jan 2004 13:42:06 -0000 Received: from antbuild.com (localhost.localdomain [127.0.0.1]) by 137100.vserver.de (8.11.6/8.11.6) with ESMTP id i07Dg1W04996 for ; Wed, 7 Jan 2004 14:42:02 +0100 Message-ID: <3FFC0C45.7080800@antbuild.com> Date: Wed, 07 Jan 2004 14:40:21 +0100 From: =?ISO-8859-1?Q?Antoine_L=E9vy-Lambert?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: using javac to buils classes files to run under java 1.2.2 References: In-Reply-To: X-Enigmail-Version: 0.82.4.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Eric Wood wrote: >I'm confused by the use of the compiler and target attributes for the javac task. I'm running ant using java 1.4.1 but need to compile my classes to run under java 1.2.2. Do I only have to use the compiler="classic" attribute or do I have to use target="1.2" as well? > >Can somebody please clarify? > > >Eric Wood >ewood@llbean.com >207.552.2306 > > > > > Hi Eric, if you want to compile using a compiler which is not the one of the VM in which ant is running, you need to use the fork="true" attribute and set the executable attribute to point to the location of the javac.exe you want to use, for instance executable="c:/jdk1.2.2/bin/javac.exe". Note that as long that you are not using routines which are only available in 1.3 or later, you can compile your java sources under java 1.4.1 and run your application under 1.2.2. Cheers, Antoine --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org