I have some java 1.5 code, that needs to be built with ant. This code implements java.sql.Statement as well as various other interfaces. However, these interfaces are not the same in newer versions of Java, thus it will not build. Thus it is inadequate to simply set the javac target to 1.5 (as is done in [this question]Setting the target version of Java in ant javac); this will not fix the interface incompatabilities (
I do have a java 1.5 jdk available. However, I cannot just set JAVA_HOME=, because the version of ant on my system was compiled with a higher version of javac, and will not run on the 1.5 JVM.
I have also tried setting this in my build.properties file:
build.compiler: javac1.5
But that also did not help.
What is the way to solve this? Is there a way to make run ant with 1.6, but make it use 1.5 javac to build things? Do I go find and build an older version of ant?