You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Petr V." <gr...@yahoo.com> on 2007/04/23 21:07:31 UTC
Specifying Jdk Version in build.xml
Hi,
I have jdk 1.4 as well as jdk 1.5 in my machine.
JAVA_HOME points to jdk 1.5
I need to compile my java code using jdk 1.4.
How could I specify in build.xml to use jdk1.4 for compiling my code instead of jdk1.5? How could I make sure that ant uses jdk1.4 and not jdk1.5 after that.
Thanks
Petr V.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
Re: Specifying Jdk Version in build.xml
Posted by "Scot P. Floess" <fl...@mindspring.com>.
I think all you need to do in your <javac> task is utilize the target
attribute. For instance:
<javc target = "1.4" ... />
Petr V. wrote:
> Hi,
>
> I have jdk 1.4 as well as jdk 1.5 in my machine.
>
> JAVA_HOME points to jdk 1.5
>
> I need to compile my java code using jdk 1.4.
>
> How could I specify in build.xml to use jdk1.4 for compiling my code instead of jdk1.5? How could I make sure that ant uses jdk1.4 and not jdk1.5 after that.
>
> Thanks
>
> Petr V.
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-392-6730 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org