How to set the path environment variable from ant script
To set the environment variables through Ant, try calling exec task and set the command line values. I have not tried this by the way, but it should work.