Tuesday, October 8, 2013

Jetty 9 unsupported version in Eclipse

I ran into an error when trying to run an embedded version version of Jetty 9 in Eclipse. The error was:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/start/Main : Unsupported major.minor version 51.0
The issue is that Jetty 9 has a dependency on Java 7, but Eclipse was still trying to use Java 6. No matter how hard I tried to edit the execution environment for the project, it would keep using Java 6. The solution for me was to create a new project, and select Java 7 as the execution environment, then copy all the files over. It's a hassle, but it gets around the apparent bug in Eclipse preventing you from changing the execution environment.

No comments:

Post a Comment