5

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)
fodon
  • 4,565
  • 12
  • 44
  • 58

2 Answers2

11

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.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
1

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?

NickGDev
  • 56
  • 4
  • java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) – fodon Jul 28 '15 at 15:51
  • I think that is the latest. – fodon Jul 28 '15 at 15:51
  • 1
    Apologies i missed your last comment, it is important to note Java 7 is now out of support (since April 2015). Jetty 9.3.1 was just released in May 2015 so they've chosen to make Java 8 the minimum for 9.3.1 (if for some reason you must stay on Java 7 and you dont need HTTP 2.0 / Jetty 9.3 feature xyz, Jetty 9.2 is Java 7 compatible) - Jetty 9.3 Release notes https://webtide.com/jetty-9-3-features/ – NickGDev Aug 03 '15 at 18:31