Solve the unsupported Major.minor version 51.0 problem in Java _java

Source: Internet
Author: User
Tags unsupported

Unsupported Major.minor version 51.0 solution

Today, occasionally, colleagues encounter a problem and deepen their understanding of the build path and Java compiler compliance level in eclipse.

Resolve Unsupported Major.minor version 51.0 error

Recently, a new installation used Jdk7, and some classes were compiled to replace the original, unsupported Major.minor version 51.0 error. Online search found the cause of the problem: the Jdk7 compiled class file on the Jdk6 run in Tomcat, will report this error.

It's also easy to solve: open properties on items in Exclipse-java compiler– Select a suitable version and recompile.

Specific steps

Resolution: Project------> right------> Attributes------>java Compiler------>compiler Compliance level------> Select the JDK version you are using------> applications.

Summary: Different JDK versions use different major.minor, which can cause this error. In the project to use the current Computer Configuration JDK version, avoid confusedly.

Knowledge Expansion: Major.minor version, which is equivalent to the primary and secondary versions of a software, but here is the main version and minor version number of a Java class that is identified.

The above is the Java unsupported Major.minor version 51.0 solution of the data collation, follow-up to supplement the relevant knowledge, thank you for your support for this site!

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.