Java 6 Unsupported major.minor version 51.0 Java 6 Unsupported major.minor version 51.0 java java

Java 6 Unsupported major.minor version 51.0


According to maven website, the last version to support Java 6 is 3.2.5, and 3.3 and up use Java 7. My hunch is that you're using Maven 3.3 or higher, and should either upgrade to Java 7 (and set proper source/target attributes in your pom) or downgrade maven.


That version number (51.0) indicates that you are trying to run classes compiled for Java 7. You will need to recompile them for Java 6.

Note, however, that some features may no longer be compatible with Java 6, which is very old, and no longer (publicly) supported by Oracle.


i also faced similar issue. I could able to solve this by setting JAVA_HOME in Environment variable in windows. Setting JAVA_HOME in batch file is not working in this case.