Unsupported major. minor version 51.0 solution

Source: Internet
Author: User
Tags unsupported

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.