Java Ant Build Error
Error:
C:\...\build.xml:21: java.lang.UnsupportedClassVersionError:
com/sun/tools/javac/Main : Unsupported major.minor version 51.0
The Unsupported major.minor version 51.0 means somewhere code was compiled for a given version of the JDK, and that you are trying to run those classes under an older JDK.
In my case, the issue was that I had a jrm which does not have tools.jar, to quickly fix this without messing with sys keys and without changing the Java version on the machine I just copied the file into the lib directory, but i carelessly copied one from a different jdk version.
Next time, make sure versions match!