This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes run Ant on 1.3.x JRE but compile app. on 1.4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "run Ant on 1.3.x JRE but compile app. on 1.4.0" Watch "run Ant on 1.3.x JRE but compile app. on 1.4.0" New topic
Author

run Ant on 1.3.x JRE but compile app. on 1.4.0

Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
I've recently experienced the problem described here. To avoid it until a more stable release of the next version of Ant is available, is there a way to run Ant using one JRE while directing Ant to invoke a compiler for a different version. For example, how do I run Ant on 1.3.x while having Ant compile my source code using 1.4.0? I've looked at setting the build.compiler property as described in the javac task, but the output generated by the -verbose command line argument to Ant indicates that Ant is still using what it finds at JAVA_HOME, which is 1.3.1_02.
Thanks for your time,
Craig
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi Craig - Notice that Conor (he is 'the man' with Ant) said on Feb 14 that a fix was in and to try a recent nightly build.
I believe I'd do that ......
G.
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
Thanks. I did notice the comments that you mention.
Based on my work with Ant, I'm confident that the fix will work, and I may try one of those nightly builds. However, they're tagged as alpha; I don't want to use an alpha release for my main work.
For now, to use Ant and Java 2 SDK 1.4.0, I run Ant with the system property os.name set to "Windows 2000," as one poster from the linked thread mentioned. It somewhat solves the problem that I faced. Ultimately, though, until the next release is stable enough for my main work, I would appreciate any more thoughts on running Ant 1.4.1 on Java 2 SDK 1.3.x while instructing compilation to use Java 2 SDK 1.4.0.
Thanks,
Craig
 
wood burning stoves
 
subject: run Ant on 1.3.x JRE but compile app. on 1.4.0