我试图在持续的 Java 7 上运行 .jar 文件。我收到了这个错误:
Could not load 'plugins/ucars.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/useful/ucars/ucars : Unsupported major.minor version 51.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugins(CraftServer.java:239)
at org.bukkit.craftbukkit.v1_4_R1.CraftServer.<init>(CraftServer.java:217)
at net.minecraft.server.v1_4_R1.PlayerList.<init>(PlayerList.java:55)
at net.minecraft.server.v1_4_R1.DedicatedPlayerList.<init>(SourceFile:11)
at net.minecraft.server.v1_4_R1.DedicatedServer.init(DedicatedServer.java:104)
at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:399)
at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.UnsupportedClassVersionError: com/useful/ucars/ucars : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
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(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
... 9 more
(这是CraftBukkit v1.4.7 R1.0 服务器)只有这个插件,.jar,不工作。
如果这是因为 java 版本不同,我如何在 Java 7 上运行 Java 6 文件(?)?
(Mac OS X Lion 10.7.5)