Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Unsupported major.minor version 52.0 error Minecraft [duplicate]

Tags:

java

minecraft

I am currently trying to run a plugin im working on onto a test server. The Minecraft server is running spigot 1.7.10, here is the servers java version:

java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

here is my java version

java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

So it makes no sense why I should be getting this error on my plugin when loading it.

26.11 02:19:38 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: mad/madster/msm/Main : Unsupported major.minor version 52.0

I am using eclipse luna on windows 8.

like image 655
Madster Avatar asked Nov 26 '14 07:11

Madster


2 Answers

You are compiling your plugin with the Java 8 compiler. You are running your server with Java 7, which is not capable of reading the Java 8-format class files in your plugin.

You can either:

  • Update the server to Java 8.
  • Make Eclipse use the Java 7 compiler (if it's installed on your development machine) by selecting a Java 7 JDK version, in Preferences > Java > Installed JREs:
  • Make Eclipse tell the Java 8 compiler to pretend to be the Java 7 compiler, by setting your "compiler compliance level" to 1.7, in Preferences > Java > Compiler:
like image 124
user253751 Avatar answered Sep 18 '22 13:09

user253751


You have to download java8 and run it with this jre.

like image 22
Jens Avatar answered Sep 19 '22 13:09

Jens