Upgrading to jetty 9.3.1.v20150714 caused Unsuppor

2019-06-21 13:05发布

问题:

The error message doesn't seem helpful. Any idea what is going wrong?

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/server/Handler : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

回答1:

That's a standard error from Java indicating that you are using an older JVM than the Classes you are attempting to run. (the Unsupported major.minor version numbers might be different depending on scenario, but the number you are presented indicates the version of Java you need).

I usually use the Wikipedia article on "Java Class File" to find out what the Class file major.minor version number translates to as far as a Java JVM requirement.

As for Jetty 9.3+, that requires Java 8 per its announcement email.



回答2:

This error usually means the JRE installed on your machine is older than the minimum required by the project / library.

I suspect Jetty 9.3.1 now requires at least JRE 1.7

What does "java -version" return in your console?



标签: Jetty