Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run jetty start.jar

Tags:

java

jetty

When I run start.jar I get the following error:

 Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/
 jetty/start/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
 Could not find the main class: org.eclipse.jetty.start.Main. Program will exit.

According to the Jetty documentation (http://www.eclipse.org/jetty/documentation/current/quickstart-running-jetty.html), all I need to do is download the zip, extract, and run start.jar. Google doesn't seem to provide me with any people having similar issues.

Thanks, Sam

like image 840
Samuel Smith Avatar asked May 22 '13 07:05

Samuel Smith


1 Answers

Take a look on the following discussion and specifically on the most popular answer.

Shortly you have a problem of class version incompatibility. Your jetty is compiled with compiler of java 7 while you are trying to run it with JVM of previous version. The solution is: go forward to Java 7: upgrade your JDK and configure eclipse to use java 7 and start enjoying the new features.

like image 76
AlexR Avatar answered Oct 05 '22 06:10

AlexR