aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Need some Guidance in using Java 1.6 with ANT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Need some Guidance in using Java 1.6 with ANT" Watch "Need some Guidance in using Java 1.6 with ANT" New topic
Author

Need some Guidance in using Java 1.6 with ANT

Harish Tam
Ranch Hand

Joined: Feb 17, 2005
Posts: 71

Hello all,

I am using JDK 1.5 version on my machine, installed JRE is of java 1.5, using ant build.xml file
and Need to use java 1.6 to compile some files using the same ant build.xml (via ant build method)
I have not installed java 1.6 jre on my machine but just have a copied folder which has JDK 1.6.0_25, can we specify the java compiler and the jar files related to 1.6 , so that the files
can be compiled using java 1.6


Thanks

SCJP 1.4, SCWCD 1.4
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Yes you should be able to. Carefully read the javac task docs (http://ant.apache.org/manual/Tasks/javac.html), paying attention to the fork (set it to "yes") and executable (set it to the javac.exe within the java1.6.0_25/bin directory) properties.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need some Guidance in using Java 1.6 with ANT