Help-me error in Java Plugin

Discussion in 'Plugin Development' started by yLucasxz, Jan 23, 2021.

  1. Offline

    yLucasxz

    Code:
    [12:27:02 ERROR]: Could not load 'plugins\lpermissions.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/lucas/lpermissions/Main has been compiled by a more recent version of the Java Runtime (class file version 59.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.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot.jar:git-Spigot-db6de12-18fbb24]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_281]
    Caused by: java.lang.UnsupportedClassVersionError: me/lucas/lpermissions/Main has been compiled by a more recent version of the Java Runtime (class file version 59.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_281]
            at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_281]
            at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_281]
            at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.8.0_281]
            at java.net.URLClassLoader.access$100(Unknown Source) ~[?:1.8.0_281]
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_281]
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_281]
            at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_281]
            at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_281]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_281]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_281]
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_281]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_281]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            ... 6 more
     
  2. Offline

    Kars

    Your plugin was compiled with Java 15 and you are running Java 8.
    Update your Java or compile the plugin with Java 8.
     
    yLucasxz and Strahan like this.
  3. Offline

    Strahan

    If you're going to make plugins, you really need to learn to read a stack trace. It tells you right there:


    Caused by: java.lang.UnsupportedClassVersionError: me/lucas/lpermissions/Main has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0
     
    yLucasxz likes this.

Share This Page