I am trying to execute a java class using Ant. I used the task
<java... >
But when it starts, I get the following:
java.lang.UnsupportedClassVersionError: mypackage/myTest: Unsupported major.minor version 51.0 at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194) ...
My ant does not work on Java 1.7. I saw that for the javac task you can specify the target to install the java version. Is there a way to specify a specific JDK to use with a java task?
source share