The reason is long and boring, but I need to run an Ant script to compile Java 1.5 code from a Java 1.4 app. I keep getting this error, though:
BUILD FAILED
Have you set environment variables JAVA_HOME and ANT_HOME properly? If you are setting via code it should work though.
Also check if your %JAVA_HOME%\bin directory %ANT_HOME%\bin should be in the environment variable 'path'.
Your problem seems to be with the %JAVA_HOME%\bin not being present in the envt. variable path though.