Bad Class Version Error

Discussion in 'Bukkit Help' started by Tagette, May 22, 2011.

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

    Tagette

    Trying to create a plugin but I keep getting this error.

    Could not load 'plugins/Template.jar' in folder 'plugins':
    java.lang.UnsupportedClassVersionError: Bad version number in .class file

    I am using Mac OSX 10.5 and netbeans.

    This happens for other plugins too, not just mine.

    Way I get around it is I go Applications>Utilities>Java Preferences and I disable J2SE 5.0 then start server.
    However this breaks minecraft so I have to turn it back on before starting minecraft.

    This is a new error, it used to work fine...
    At first I was having the problem with McMyAdmin but now I'm having it with Craftbukkit alone.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  2. Offline

    Jeyge

    A lot of plugins require Java 1.6 so you will need to get that installed and at the top of the list.
     
  3. Offline

    Tagette

    downloading newest craftbukkit now..

    EDIT: Same error as before.

    I have Java SE 6, as far as I know that is Java 1.6.

    I thought disabling J2SE 5.0 would fix my problems because shouldn't Java SE 6 have everything in J2SE 5.0 and more? But it didn't fix my problems.. It breaks my minecraft.

    I have checked to make sure I have the most recent updates using apple's software updater. Do I need to do something else?

    Heres a Pastebin of my console when I have J2SE 5.0 Active: Click!

    Here's a Pastebin of my console when I have J2SE 5.0 Disabled: Click!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  4. Offline

    Jeyge

    It might be. All I know is that the error you are getting usually means that you need to update to Java v1.6. And add to that the fact that when you disable 5.0, nothing work, I would say you don't have 6.0 correctly installed. All I remember when I used goggle to search for Apple Java 1.6 installs was that the 1.6 version had to be at the top of the list. What list, I have no clue. I don't have a Mac.
     
  5. Offline

    Tagette

    top of list... sounds easy enough

    great that solved that thanks.. Didn't know u could order them..

    The java versions are listed in the java preferences and they have to be in right order.
    Applications/Utilities/Java Preferences

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  6. Offline

    Jeyge

    Good to hear it fixed it. If you tell me what the list is, the next post I can give more complete information.
     
  7. Offline

    Tagette

    umm Java SE 6 then J2SE 5.0 then any lower versions
     
Thread Status:
Not open for further replies.

Share This Page