Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading to jetty 9.3.1.v20150714 caused Unsupported major.minor version 52.0

Tags:

jetty

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)
like image 836
fodon Avatar asked Jul 27 '15 00:07

fodon


2 Answers

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.

like image 93
Joakim Erdfelt Avatar answered Oct 21 '22 20:10

Joakim Erdfelt


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?

like image 34
NickGDev Avatar answered Oct 21 '22 21:10

NickGDev