Solved Major.Minor 52.0 Unsupported

Discussion in 'Plugin Development' started by BTTFHamsterZK, Jul 7, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    BTTFHamsterZK

    Hello everyone! I have a problem with my plugin, and I really don't know what it is.
    I have been making a network for a team, and all of my code is right, but there is just this one problem which i don't know how to fix. I believe that it is a problem with my Java version, which I have used 4 different java versions, all crashing with the same error.
    The Java versions I have tried:
    - JDK7_79
    - JDK8_45
    - JRE8_45
    - JRE7_79
    Here is the stacktrace
    Code:
    07.07 09:56:34 [Server] INFO ... 14 more
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.lang.Class.forName0(Native Method) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.net.URLClassLoader.access$100(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_51]
    07.07 09:56:34 [Server] INFO Caused by: java.lang.UnsupportedClassVersionError: me/BattleHamster/Core/Core : Unsupported major.minor version 52.0
    07.07 09:56:34 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_51]
    07.07 09:56:34 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:368) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:404) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand(CraftServer.java:628) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:642) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.Bukkit.reload(Bukkit.java:534) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:740) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:291) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot_1.8.7_b3c0272-7723b90.jar:git-Spigot-b3c0272-7723b90]
    07.07 09:56:34 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/BattleHamster/Core/Core : Unsupported major.minor version 52.0
    07.07 09:56:34 [Server] ERROR Could not load 'plugins/HUB.jar' in folder 'plugins'
    If you need any more information, just ask me here, I will let you have whatever is needed.
     
    Last edited: Jul 7, 2015
  2. Make sure your Java version matches with the one your server is running.
     
  3. @BTTFHamsterZK
    I had to deal with this too in the beginning. Changing the PATH variable didn't work. Make sure (in case using eclipse, that's where I know how to do it) you do this:
    1. Right click your project
    2. Click properties, then java build path on the left and then libraries on the top
    3. Click on the JRE System library, and click on "Edit" on the side
    4. Choose execution environment and select the correct java version (in your case it's java 8, check an older version you have installed).
     
    BTTFHamsterZK likes this.
  4. Offline

    BTTFHamsterZK

    Thank you! This helped me fix this issue.
     
Thread Status:
Not open for further replies.

Share This Page