Java. lang. UnsupportedClassVersionError, java. lang. error
Thank you!
============================
I was planning to deploy the war package on my computer. After the deployment, I encountered a small problem:
Caused by: java. lang. unsupportedClassVersionError: com/huike/sort/dao/order/DeliverylineDao: Unsupported major. minor version 51.0 (unable to load class com. huike. sort. dao. order. deliverylineDao)
At org. apache. catalina. loader. WebappClassLoader. findClassInternal (WebappClassLoader. java: 2961)
.
.
.
Cause of this error:
The error is reported because the Java class bytecode file compiled with JDK of a higher version is trying to run on the JVM of a lower version.
Note: the format of the class file generated by JDK of a higher version may be different from that of JDK of a lower version. class. In this way, the. class file cannot be interpreted and executed in earlier versions of JVM, and a Class version error not supported by java. lang. UnsupportedClassVersionError will be thrown.
========================
View the JVM version:
Public class xx {
Public static void main (String args []) {
System. out. println ("jvm implementation version: \ t" + System. getProperty ("java. vm. version "));
System. out. println ("jvm standard version: \ t" + System. getProperty ("java. vm. specification. version "));
}
}
Solution: Upgrade JVM