Are you using JDK 6 to run Ant? What is JAVA_HOME set to?
Which exact version of Ant? You mentioned 1.7, but is it really 1.7.1? (I'm looking at the 1.7.1 docs, which say that javac1.6 is valid; I don't know if it is valid in 1.7. Also, from reading the docs it appears that using javac1.6 is the same as using javac1.5, they are both aliases for "modern" which means to use the standard JDK compiler.)