This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 5812
    
    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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need some Guidance in using Java 1.6 with ANT
 
Similar Threads
Problem with JRE compatibility
Specify Java Version in build.xml
Can we have jdk6 on jre5?
IS 1.6 JRE Required
JDK version vs JRE version