JAVA Unsupported major.minor version 51.0


I'm not a programmer but I couldn't find any answer on this website. I'm trying to run a game on linux ubuntu with Java Open JDK but nothing happen. I tried to run it with the prompt command and it said this:

[email protected]:~$ '/home/leops95/Bureau/Minecraft.jar' Exception in thread "main" java.lang.UnsupportedClassVersionError: net/kc/main/Main :

Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(

Could not find the main class: net.kc.main.Main. Program will exit.

I think there is something wrong with the version of Java, right ?

This question is tagged with java

~ Asked on 2013-12-19 19:30:48

The Best Answer is


This is because of a higher JDK during compile time and lower JDK during runtime. So you just need to update your JDK version, possible to JDK 7

You may also check Unsupported major.minor version 51.0

~ Answered on 2013-12-19 19:33:56


The Java runtime you try to execute your program with is an earlier version than Java 7 which was the target you compile your program for.

For Ubuntu use

apt-get install openjdk-7-jdk

to get Java 7 as default. You may have to uninstall openjdk-6 first.

~ Answered on 2013-12-19 19:42:41

Most Viewed Questions: