OK, that is a completly different question than what you asked originally.
You cannot use the <ant> task to do what you want to do. You will have to use the <exec> instead and run another copy of Ant. I recommend writing a script that invokes Ant with the other JVM and calling that script.
Or you can use the <java> task, though setting up the proper environment for Ant might be a pain (you will have to dig through the ant run script to see what all it does and mimic that).
But before you do any of that, tell me why you need to run script B with the 1.5 JVM.
Joined: Nov 10, 2009
I think I will follow your first suggestion to write a script and invoke ant build file in that script.