Unsupported major.minor version 51.0 solution
Today, my colleague encountered a problem, which also deepened his understanding of build path and java compiler compliance level in eclipse.
Resolve Unsupported major.minor version 51.0 error
Recently, a new installation uses jdk7, and some classes were compiled to replace them into the original normal running project. After the replacement, an Unsupported major.minor version 51.0 error occurred. After searching online, I found the reason for the problem: if the class file compiled with jdk7 is placed in tomcat based on jdk6, it will report this error.
It is also very convenient to solve: open the property on the project in exclipse - java compiler and select a suitable version and recompile it.
Specific steps
Solution: Project ------->Right-click ------->Properties ------->Java Compiler ------->Compiler Compliance Level ------->Select the JDK version you are using ------->App.
Summary: Different JDK versions use major.minor differently, so this error will be caused. In the project, you should use the JDK version configured by the current computer, and do not misunderstand it.
Knowledge extension: major.minor version, which is equivalent to the primary and secondary version number of a software, but here is the primary and secondary version number of a Java Class identified.
The above is the information for the Java Unsupported major.minor version 51.0 solution, and the relevant knowledge will be added in the future. Thank you for your support for this site!