Today, my colleague encountered a problem by accident and deepened his understanding of build path and java compiler compliance level in eclipse.
Resolving the Unsupported major. minor version 51.0 error
Recently, jdk7 is newly installed, and some classes are compiled to replace them with the normal running projects. After the replacement, the Unsupported major. minor version 51.0 error occurs. The cause of the problem was found through online search: the class file compiled with jdk7 is put in tomcat running based on jdk6. this error will be reported.
It is easy to solve: open the property of the project in exclipse-java compiler-select a suitable version and re-compile it.
Procedure
Solution: Project ------> right-click ------> properties ------> Java Compiler ------> Compiler Compliance Level ------> select your JDK Version ------> application.
Conclusion: different JDK versions use different major. minor, which causes this error. To use the JDK Version configured on the current computer in the project, do not use Dr. Zhang.
Knowledge expansion: major. minor version, which is equivalent to the primary and secondary version of a software, but here is the primary version and secondary version of a Java Class.