Plugin wont wont on my server.

Discussion in 'Plugin Development' started by NikplayzYT, Aug 23, 2021.

  1. Offline

    NikplayzYT

    Hello, so I was working on my first plugin and I got an error.
    On my server when I run /plugins , it doesn't show up.

    Code:
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/nik/plugin/Main has been compiled by a more recent version of the Java Runtime (class file version 60.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:133) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:327) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:248) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:305) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:205) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_301]
    Caused by: java.lang.UnsupportedClassVersionError: com/nik/plugin/Main has been compiled by a more recent version of the Java Runtime (class file version 60.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_301]
        at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_301]
        at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_301]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:148) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_301]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_301]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_301]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:78) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[spigot-1.12.2.jar:git-Spigot-dcd1643-e60fc34]
        ... 6 more
     
    Last edited by a moderator: Aug 24, 2021
  2. Offline

    timtower Administrator Administrator Moderator

    @NikplayzYT Recompile with java 8, your used java version is too high
     

Share This Page