Plugin runs fine on windows but not centOS

Discussion in 'Spigot Plugin Help' started by DuYan, May 14, 2015.

Thread Status:
Not open for further replies.
  1. So, I couldn't run a plugin on my centOS VPS.

    I decided to make a small plugin that simply says "yo" when you do /c.

    It runs perfectly fine on windows.

    But when I do it on my centOS VPS, I get this error.

    [23:01:37 ERROR]: Could not load 'plugins/test.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: test/Main : Unsupported major.minor version 51.0
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:336) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:258) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:288) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:740) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.Bukkit.reload(Bukkit.java:301) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:643) [Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchServerCommand(CraftServer.java:629) [Craftbukkit.jar:git-Spigot-"4133000"]
    at net.minecraft.server.v1_8_R1.DedicatedServer.aM(DedicatedServer.java:353) [Craftbukkit.jar:git-Spigot-"4133000"]
    at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:317) [Craftbukkit.jar:git-Spigot-"4133000"]
    at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:627) [Craftbukkit.jar:git-Spigot-"4133000"]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:530) [Craftbukkit.jar:git-Spigot-"4133000"]
    at java.lang.Thread.run(Thread.java:701) [?:1.6.0_35]
    Caused by: java.lang.UnsupportedClassVersionError: test/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.6.0_35]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643) ~[?:1.6.0_35]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.6.0_35]
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) ~[?:1.6.0_35]
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73) ~[?:1.6.0_35]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212) ~[?:1.6.0_35]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.6.0_35]
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205) ~[?:1.6.0_35]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323) ~[?:1.6.0_35]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268) ~[?:1.6.0_35]
    at java.lang.Class.forName0(Native Method) ~[?:1.6.0_35]
    at java.lang.Class.forName(Class.java:274) ~[?:1.6.0_35]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[Craftbukkit.jar:git-Spigot-"4133000"]
    ... 14 more


    Any help?
     
  2. Tux

    Tux

    Upgrade Java
     
    • Like Like x 1
  3. update java
     
  4. Do not do 'yum install java7' EVER! Learn the proper way and download it from oracles website the .rpm and install it.
     
  5. Install JRE 7 from Oracle's website.
     
  6. I guess you could say what I said.....
     
  7. Sorry, I only read the first post, I was in a hurry to get off my phone (Arrived at school).
     
  8. Ok. I forgive you ;)
     
  9. I posted this just before I went to bed. And, while I was trying to fall asleep, I realized something. I was trying to figure out what was different from my laptop to my VPS, and then suddenly it dawned on me.. Java. Thank you, guys, I'm gonna go update java. Requesting lock.
     
Thread Status:
Not open for further replies.