Solved Strange bug changes between servers.

Discussion in 'Plugin Development' started by yourselvs, Apr 26, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    yourselvs

    I have a bug that I have no clue how to solve. The reason is that it only appears on my friends' server. I am developing a plugin that allows players to send suggestions and admins to manage those suggestions. When i tested it on my own bukkit server it loaded in and worked fine. However, when I sent it to my friend, the server owner, to actually put it there, it wouldn't even load, and gives the following error:

    Code (open)
    Code:
    [09:00:10] [Server thread/ERROR]: Could not load 'plugins/SuggestionHelper (1).jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/yourselvs/MainClass : Unsupported major.minor version 52.0
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot188.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot188.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot188.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot188.jar:git-Spigot-db6de12-18fbb24]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75]
    Caused by: java.lang.UnsupportedClassVersionError: me/yourselvs/MainClass : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_75]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[?:1.7.0_75]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_75]
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[?:1.7.0_75]
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[?:1.7.0_75]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.7.0_75]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_75]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_75]
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_75]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_75]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_75]
    at java.lang.Class.forName0(Native Method) ~[?:1.7.0_75]
    at java.lang.Class.forName(Class.java:274) ~[?:1.7.0_75]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot188.jar:git-Spigot-db6de12-18fbb24]
    ... 6 more


    What would cause this to work for me, but not work for someone else? Is there something I haven't included?
     
  2. Offline

    Konato_K

  3. Offline

    mine-care

  4. Offline

    yourselvs

    @Konato_K and @mine-care, thanks for the fix! However, I'm interested as to what would make it work on my machine and not his? He has the newest version of java installed.
     
  5. Offline

    Konato_K

    @yourselvs If he has the newest then you probably come from the future (no but really, he probably has Java 7 and you 8, or something like that)
     
  6. Offline

    I Al Istannen

    @yourselvs
    He can open a Command line (or terminal, depending on the OS) (Win+R on windows, type "cmd" and press enter, if he uses linux he knows where it is ;)). Inside there you type "java -version" and press enter. The version you see there is the one currently used. He may have two Java versions installed and it uses the wrong one.
     
    yourselvs likes this.
  7. Offline

    yourselvs

    @I Al Istannen This is what happened. He had both installed and used the wrong one.
     
  8. Offline

    mine-care

    @yourselvs If this thread is sorted, please mark it as 'Solved'
     
Thread Status:
Not open for further replies.

Share This Page