Thursday, 24 March 2016

java - Why is Ant giving me a Unsupported major.minor version error



I'm running this target in Ant.



    description="compile the source " >






It's giving me this error.




C:\Users\..\workspace\..\build.xml:21: java.lang.UnsupportedClassVersionError:
com/sun/tools/javac/Main : Unsupported major.minor version 51.0


Here are the versions:




Apache Ant(TM) version 1.8.2

JDK version is JDK 1.7.0


Here's my Compiler settings in Eclipse.



enter image description here




Please help me resolve it.


Answer



The runtime jre was set to jre 6 instead of jre 7 in the build configuration window.


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...