ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <>
Subject Re: using javac to buils classes files to run under java 1.2.2
Date Wed, 07 Jan 2004 13:40:21 GMT
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
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.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message