Possible Duplicate:
Override the compiler attribute in an Ant javac task
In Ant, how exactly do I use the build.compiler option, or the <javac> task's compiler attribute?
I tried setting compiler="javac1.5", but when I opened the resulting class-file in a hex editor, the class version was still shown as 32 hex (version 1.6) — until I set JAVA_HOME to point to my JDK 1.5 installation. (Until then, it had been pointing to my JDK 1.6 installation.) So it seems like JAVA_HOME supersedes the compiler attribute — in which case, what is the purpose of that attribute?
The source and target attributes do seem to work correctly; when I specify the target version, the resulting class-file does have the right version.