Java. Lang. unsupportedclassversionerror: bad version number in. Class File

Source: Internet
Author: User

The class version is not supported. It indicates that the JDK or server version is incorrect during compilation or running.

  1. To run a compiled project file, the version of the runtime environment in which it is located should be no less than the version at the time of compilation. Therefore, JDK should be set in two places in the eclipse environment to comply with this rule.
    • Right-click the project file and click Properties for configuration. in Java build path, select JDK version.
    • Java compiler is set by the compiler. The level here should be less than or equal to the JDK version in build path.

2. Find the place where servers is set in eclipse or myeclipse. Generally, Tomcat is used. Select a version of Tomcat. JDK related to this version is set to the current JDK version.

All three items must be modified to avoid errors.

 

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.