0

我一直在测试我添加到我的 bukkit minecraft 服务器的新插件,并看到以下错误消息:

C:\Users\XXX\XXXXXXX\XXXXXXXXXXXX>java -Xms1024M -Xmx1024M -jar craftbukkit-1.5.
2-R0.1.jar -o true
229 recipes
27 achievements
14:12:34 [INFO] Starting minecraft server version 1.5.2
14:12:34 [INFO] Loading properties
14:12:34 [INFO] Default game type: SURVIVAL
14:12:34 [INFO] Generating keypair
14:12:34 [INFO] Starting Minecraft server on XX.XX.XXX.XXX:25565
14:12:34 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.2-R0.1
-b2771jnks (MC: 1.5.2) (Implementing API version 1.5.2-R0.1)
14:12:34 [SEVERE] Could not load 'plugins\CustomPlayerJoinMessaging.jar' in fold
er 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError
: me/xXTh3B3astXxify/CustomJoin/CJMain : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:184)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:230)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.ja
va:239)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:21
7)
        at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
        at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11
)
        at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.jav
a:106)
        at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java
:382)
        at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:5
73)
Caused by: java.lang.UnsupportedClassVersionError: me/xXTh3B3astXxify/CustomJoin
/CJMain : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:80)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:173)
        ... 9 more
14:12:34 [SEVERE] Could not load 'plugins\SimpleVIPPerks_3.50.jar' in folder 'pl
ugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError
: com/gmail/chalkie19/SimpleVIPPerks : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:184)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:230)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.ja
va:239)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:21
7)
        at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
        at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11
)
        at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.jav
a:106)
        at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java
:382)
        at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:5
73)
Caused by: java.lang.UnsupportedClassVersionError: com/gmail/chalkie19/SimpleVIP
Perks : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:80)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:173)
        ... 9 more
14:12:34 [SEVERE] Could not load 'plugins\AdminConversations.jar' in folder 'plu
gins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError
: com/momca96/bukkit/AdminConversations/AdminConversations : Unsupported major.m
inor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:184)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:230)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.ja
va:239)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:21
7)
        at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
        at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11
)
        at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.jav
a:106)
        at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java
:382)
        at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:5
73)
Caused by: java.lang.UnsupportedClassVersionError: com/momca96/bukkit/AdminConve
rsations/AdminConversations : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
.java:80)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:53)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:173)
        ... 9 more

(复制的可能不仅仅是解决此问题所需的信息,但我不知道它需要什么信息)。

我试图在互联网上找到解决方案,但对人们建议的解决方案感到困惑。我在我的计算机上重新安装了 java(到最后一次更新),但没有任何改变。

请向我确切解释如何解决这个问题(如果有什么我能做的),因为我不明白人们在我在互联网上看到的解决方案中使用的特殊和/或缩写词(例如 JRE,我不知道如何做他们要求做的测试。

太感谢了。

4

2 回答 2

3

不支持的major.minor 版本51.0表明,jar 中包含的二进制类(也称为字节码)是为更新的JRE 版本编译的。

JRE 版本文档指出,版本 51 是 JRE 7。

发出命令以检查您的版本。

java -version

JRE 7 可能未随您的操作系统一起提供。因此,您可以选择自己设置 JRE(在 /opt 中)并使用 JAVA_HOME 环境变量来使用它。

于 2013-05-27T11:40:23.200 回答
0

您已针对 Java 7 进行编译,而您的服务器仅运行 Java 6。您可以安装 Java 7,但如果您打算制作在线发布的公共插件,则可以使用 Bukkit 我建议仅针对 Java 6 构建,因为很多用户都使用它并且Bukkit 的开发人员甚至提出了这样的建议。

于 2013-12-17T02:36:03.097 回答