Java Stacktrace error Unsupported major.minor version 51.0 [duplicate]

前提是你 提交于 2019-11-28 11:03:21

Java class files compiled for Java 7 have Major/Minor versions 51/0. If you have a JVM implementation that wasn't prepared for Java 7, it would give you this error indicating "I don't know how to interpret and run this class file."

Try either compiling for an older JVM version, or upgrade your JVM.

Hope this helps!

Matzi

The problem is that your SDK and runtime environment is not matching. Try to check the compile option to use the right version, which you have for both.

See also: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

If you are using Netbeans with maven and your maven-compiler-plugin has the value from properties file, then change it to literal values like 1.6 and your issue will go away. This has to do with Netbeans being confused.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!