Plugin not Working Because of Java Version....

Discussion in 'Plugin Development' started by Graffetus, Dec 9, 2018.

  1. Offline

    Graffetus

    Hello. My problem is that I think my Java Version is too recent for my plugin, but I'm not really sure of how to fix it easily. Here is the stacktrace:
    Code:
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/rabih/gizmos/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:327) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:248) [Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at org.bukkit.craftbukkit.v1_13_R2.CraftServer.loadPlugins(CraftServer.java:323) [Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:213) [Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:702) [Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
    Caused by: java.lang.UnsupportedClassVersionError: me/rabih/gizmos/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
            at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_191]
            at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_191]
            at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_191]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:150) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_191]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_191]
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_191]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_191]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:78) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[Spigot%201.13.2.jar:git-Spigot-a1f2566-a4c555b]
            ... 6 more
     
  2. @Graffetus
    When building the plugin, use the version that your server/computer supports. For eclipse, you do this by going into BuildTools > Add Library > JRE > and then select the version of java you want to support (which is Java 8).
     

Share This Page