java.lang.UnsupportedClassVersionError: Bad version number in .class file

Open source software supply chain lighting plan, waiting for you>>>

The reason for this error is that your version of JDK supporting Tomcat running is inconsistent with that supporting application running

So how to solve the above problems

The solution is obvious: change their JDK version to be consistent

The steps are as follows:

1.Window –> Preferences –> Java –> Select JDK version from the drop-down menu corresponding to compiler compliance level in compiler

2.Window –> Preferences –> MyEclipse –> Servers –> Tomcat –> Tomcat n.x –> Select the version of JDK installed on your computer from the drop-down menu under Tomcat JDK name in JDK (it must be consistent with the version of JDK in step 1)

If it’s not solved, don’t worry, because some MyEclipse versions come with JDK version, so we need to change it

3.Window –> Preferences –> Java –> Installed jres, and then select the JDK version that is consistent with step 1 and step 2 on the right. If not, you can add it yourself. Then select it

This article comes from “Qiao Lei’s blog learning progress” blog, no reprint

Similar Posts: