Plugin Problems (Possibly Mac problem?)

Discussion in 'Bukkit Help' started by Relick, May 13, 2011.

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

    Relick

    Hey guys, running CraftBukkit on my mac and I can't seem to install any plugins? A very minor select few work, however the majority gives me pretty much the same error, e.g. this one from TimeShift:
    Code:
    [SEVERE] Could not load 'plugins/TimeShift.jar' in folder 'plugins':
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:134)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:160)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:108)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:85)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    I'm currently running CraftBukkit build 766 but I have also reinstalled and tried with 740. This happens with the majority of plugins, possibly because I am unable to use the latest version of java on my architecture.


    Mac OS X 10.5.8
    PowerPC G5 Architecture Dual Core 64 Bit.
    Java Version: 1.5.0_28
     
  2. Offline

    Jeyge

    Update your Java to 1.6.

    Edit - I just saw your note at the bottom. Why wouldn't you be able to use the latest version of Java? It isn't machine dependent.
     
  3. Offline

    TBK

    Apple has to provide the build, and I don't think they support the PowerPC based Macs any longer.

    You could work around the issue by running a virtual machine where you have Java 1.6_25 installed.

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

    cjc343

  5. Offline

    Relick

    I've tried OpenJDK 7 for PPC however it crashes the server midway through launch (just freezes). I am unable to try OpenJDK 6 and as far as I know it only compiles on Intel.

    TBK, what would you recommend for virtual machines bearing in mind I don't have Intel at the moment?
     
  6. Offline

    TBK

    I only know of http://www.microsoft.com/australia/office/mac/virtualpc7/default.aspx
     
  7. Offline

    Relick

    Nah that's useless. I might as well just get a new computer, no worries.
     
  8. Offline

    Windwaker

    There is a workaround for this.

    1. Download the last Java Update for Leopard.
    2. Go to spotlight (magnifying glass in the top right corner)
    3. Type "Java Preferences"
    4. Select "Java Preference"
    5. Uncheck "J2SE 5.0" and leave "Java SE 6" checked.
    6. Run server.
    7. Wait for Terminal to say "done"
    8. Re-check "J2SE 5.0"
    9. Open Minecraft
    10. Enter Server
    11. Profit!

    NOTE: You must have "J2SE 5.0" unchecked to start the server properly and then you must re-check it after the server has loaded. Minecraft WILL NOT RUN without "J2SE 5.0" checked.

    It's a pain I know, but you get the hang of it.
     
  9. Offline

    Relick

    Alright thanks! I'm going to try it now. Also if I move 6 above 5 and check both do you think I won't have to repeatedly switch it?
     
  10. Offline

    Windwaker

    Hmm.. it never occurred to me. Let me test it now

    EDIT: Looks like it works!
     
  11. Offline

    Relick

    As I was worried about, Java SE 6 does not appear in Java Preferences. /System/Library/Frameworks/JavaVM.framework/Versions contains 1.6, however and I will try something.

    EDIT: Didn't work (Bad CPU Type). Which means the Java 6 on my machine is written for a newer system which I don't have :/
     
  12. Offline

    cjc343

  13. Offline

    Relick

    It setup up fine and it says TimeShift 2.0 or whatever is activated.

    It also works perfectly in regards to setting day or night ('shift day world'), but when changing it using 'shift startup day world' (as an example) I get:
    Code:
    [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'shift' in plugin TimeShift v2.0.1_jre-1.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:247)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:394)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:379)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
        at tazzernator.cjc.timeshift.TimeShiftPersistentReaderWriter.persistentWriter(TimeShiftPersistentReaderWriter.java:80)
        at tazzernator.cjc.timeshift.TimeShiftCommandParser.setPersist(TimeShiftCommandParser.java:30)
        at tazzernator.cjc.timeshift.TimeShiftCommandParser.handleCommand(TimeShiftCommandParser.java:239)
        at tazzernator.cjc.timeshift.TimeShift.onCommand(TimeShift.java:184)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 6 more
    Although I really thank you for allowing me to use this plugin. It's a great help :D
     
  14. Offline

    cjc343

    Whoops -- my local source copy was 1 revision out of date. The same link now points to a version that should work.

    Since this works, it seems one possible solution is to recompile plugins for Java 1.5, which should be possible as long as no 1.6 features are used.

    It's certainly not an entirely ideal solution, but you may want to learn to compile plugins from source.

    That won't work in all cases since not everyone provides source, but if you run out of other options, you may wish to give it a try.
     
  15. Offline

    Relick

    Alright thanks, you have been an amazing help. Usually if there is a plugin without a source, they'll be another which does the same thing with a source so I'm good in most cases.

    Problem solved guys :D
     
  16. Offline

    TBK

    Wuhuu :)
     
Thread Status:
Not open for further replies.

Share This Page