Error: Unsupported Major Minor Version 51.0

Discussion in 'Plugin Development' started by Slayerlord8, Nov 23, 2013.

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

    Slayerlord8

    Ok, so I know someone's going to go 'Uhh, why didn't you know that?' but seriously, this is my last resort option for fixing this error.

    So, I'm creating my first plugin right now, and I've spent the entire day just trying to get the plugin to not give me an error.

    http://pastebin.com/ecAj64Xj There's the error straight from the server.log.

    I created the plugin using the latest recommended build (1.6.4-R2.0) and ran it on the same version.

    Now, I know Java, it's just that this one issue I can't get across... I've tried, and tried, and It just doesn't want to work. So, I'm asking you guys if you know a solution?

    Edit: Fixed! Thanks for the help :D Now, does anybody know if, and if you can, how to change the title name so I can add 'solved'? Thanks.

    If you can, it would be greatly appreciated if you know what to do! :) Thanks!
     
  2. Check the Java version of your plugin, and the server. It will give this error if the versions of Java are different.
     
    Slayerlord8 likes this.
  3. Offline

    geNAZt

    You compiled it with a Java 7 javac. Now you try to execute the Java 7 compiled jar with Java 6 (Thats the error)
     
    Slayerlord8 likes this.
  4. Offline

    Slayerlord8


    Thanks a lot for the help :)

    Wait.... so it's just for that server, right? Now I'm just asking random questions.

    Keep in mind: This is just a server to test the plugin, it is pretty old (started in 1.2.5) but I just keep changing the jars and it still works....
     
  5. Offline

    1Rogue


    Compile with java 6.

    (This is an error when a java 6 server runs a java 7 plugin).
     
    Slayerlord8 likes this.
  6. Offline

    Slayerlord8

    hmm.. I saw that in the sticky post, 'common mistakes', but I thought it wouldn't apply to me. I guess I was wrong :/

    Thanks for your reply, now I can fix it :)

    Thanks so much everyone! :) The plugin's loading now! I installed Java 6 JDK and removed 7 from my path, and then installed 6 to it. In Eclipse, I just had to go to properties for the project and select '1.6' for the compiler and rebuild the project, exported it, and it worked! Thanks a ton for the help.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  7. Offline

    clienthax

    Why didn't you just update to java 7, running outdated jre's is plain stupid.
     
  8. Offline

    Slayerlord8

    Because, most Bukkit servers are running Java 6, SO it wouldn't work for them and they'd have the same error and Java 7 servers can still run it.

    I'm not creating this plugin for a server in particular, by the way. What's the point of releasing a plugin that only some people can run?
     
  9. Offline

    FinalFred

    I doubt that "most" are still running Java 6. I'm sure a few are, but Java 7 released some performance improvements (I believe?) so any serious servers should have updated by now. Not to mention, Java 7 was released quite a long time ago by now.

    I compile all of my plugins to Java 7 partially because of the reason above, but also Java 7 has some new convenience features. The ones that immediately come to mind are binary literals and type inference for generics.


    Anyway, all I'm trying to say is I think the 'better' solution to this problem, for people reading this in the future, would be to upgrade the server's version of Java -- not downgrade the programmer's version.
     
  10. Offline

    1Rogue


    About 5.45% of tracked servers are still running 1.6: http://mcstats.org/global/
     
  11. Offline

    clienthax

    So because some idiots are still using ie6 you are coding compatibility for that when you make a website as well right ?
     
  12. Offline

    Slayerlord8

    Well, ok, fine, I don't want to start an argument, it's just that I'm using Java 6 so I can test it on my test server, and because lots of people (including administrators) have suggested in posts to use Java 6 for the 5.45% of server. I'm going to use Java 7 when I'm done.

    Well, I'm done with this thread. I've fixed the issue I needed to fix, and it's (of course, like it always does to me) starting an argument. Thanks for anyone with helpful info. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
Thread Status:
Not open for further replies.

Share This Page