我一直在尝试诊断此问题,但无法解决。顺便说一句,我正在使用Intellij。
我已经更新了插头,重新安装了我的整个服务器,尝试了bukkit,重新安装了Intellij,重新安装了我的jre,然后重新安装了我的jdk,但是它们什么都没做。
[12:26:23 ERROR]: Could not load 'plugins\Test.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/shrimp/test/Core 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:139) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:394) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:301) [spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:353) [spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:210) [spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_241]
Caused by: java.lang.UnsupportedClassVersionError: me/shrimp/test/Core 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_241]
at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.8.0_241]
at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.8.0_241]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:96) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_241]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_241]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.15.2.jar:git-Spigot-a03b1fd-bbe3d58]
... 6 more
答案 0 :(得分:0)
在我看来,该插件所编译的Java版本大于您用于运行该插件的Java版本。降级用于编译以匹配服务器的插件Java目标版本,或者升级服务器以匹配用于编译的插件Java目标版本。