NoClassDefError

Discussion in 'Plugin Development' started by lmc, Jun 14, 2012.

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

    lmc

    Hi guys

    Not that often when I ask for help in this section, but any hoe, I'll give it a shot.

    Trying to include the Apache Commons IO .jar into the build path of the plugin, however when it is loading, it is giving a NoClassDefError. Any ideas? I've heard this is something to do with the java classpath.

    Assuming I dont need to give any error logs due to myself giving a clear description of the exception.

    Thanks!
     
  2. Offline

    ferrybig

    include it inside the classpath of the java process and error is gone
     
  3. Offline

    lmc

    Sorry, little confused here. Could you explain a little more on how to do it? Thanks!
     
  4. Offline

    ferrybig

    place the jar from the apache untils at the same location as the craftbukkit.jar, and starting the process from java whit java.exe -cp "./apache.jar" <other flags, like memory> craftbukkit.jar
     
  5. Offline

    lmc

    I assume its possible, however it seems an incorrect way of doing it? Surely you can just include it in the build path of the .jar
     
  6. Offline

    ferrybig

    as far I know it, bukkit ignored the classpath option of the jar, but I am not 100% sure of me, if some people know it better, plx correct me
     
  7. Offline

    lmc

    Thanks for the help, anyone else got any ideas?
     
  8. Offline

    rmb938

    Well if its a plugin you are distributing you want to make it as easy as possible for your users. You would want to make a lib folder and use a class loader http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/ClassLoader.html I have not used class loaders so you are on your own for that. Another thing you can do is actually into the apache Commons IO source in your plugin which you are allowed to do with most apache code.
     
Thread Status:
Not open for further replies.

Share This Page