We have a step in our build which relies upon an old JDK to run, as the process does not work with Java 6. It’s not generating bytecode, just doing some modifications to text files. Updating the process would take longer than we have, and due to the nature of the process it seems quite okay to just leave this step of the build process utilizing the old JDK.
The real question is, can it be done?
You could:
Tweak the Java6 JVM settings to be compatible with the process when calling it using parameters on the Ant task:
http://ant.apache.org/manual/Tasks/java.html
OR
Execute the java command binary in the legacy JDK with an
execAnt task:http://ant.apache.org/manual/Tasks/exec.html