Java Unsupported major.minor version 52.0 error Minecraft

I'm currently trying to run the im plugin running on a test server. Minecraft server runs spigot 1.7.10, there is a version of the Java version of the servers:

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 doesn't make sense why I should get this error on my plugin when loading.

 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.

+6
source share
3 answers

You compile your plugin using the Java 8 compiler. You use your server with Java 7, which is not able to read Java 8-format class files in your plugin.

You can:

  • Upgrade the server to Java 8.
  • Make Eclipse using the Java 7 compiler (if installed on your development machine) by selecting the Java 7 JDK version in the Settings> Java> Installed JRE section: d601n.png
  • Make Eclipse tell the Java 8 compiler to pretend to be the Java 7 compiler by setting its "compiler matching level" to 1.7, in "Settings"> "Java"> "Compiler: d600r.png
+16
source

You need to download java8 and run it using this jre.

+1
source

Your code was compiled using Java 8, while you are trying to run it using Java 7. Note that Eclipse has its own compiler and does not use it in the JDK and most likely it is configured to use Java 8. Check eclipse compiler settings.

+1
source

Source: https://habr.com/ru/post/978713/


All Articles