Where do i place libraries i want to be included?

Discussion in 'Bukkit Help' started by Isabaellchen, Jan 28, 2011.

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

    Isabaellchen

    For instance the mysql jdbc driver, where do i have to put its jar file so that i dont get Class Not Found Exceptions anymore when starting the server?

    I red something about creating a lib folder inside of the folder i have my start_server.bat in, but it does not seem to work.
     
  2. Offline

    NathanWolf

    I had this same question recently, and a kind soul helped me out :)

    The trick is adding a manifest file to your jar.

    The unfortunate thing is that there is no common path, or even common name for libraries used. A few of us seem to have settled on a a "lib" folder, and sqlite.jar and mysql.jar for the driver libs.

    As far as getting them to auto-load, create a MANIFEST.MF file, with something like this in it:

    Code:
    Manifest-Version: 1.0
    Class-Path: ../lib/sqlite.jar ../lib/mysql.jar
    
    Then, you need to add this manifest to your jar (or, rather, replace the one that gets created by default.

    If you use Eclipse, this is the last panel of the "Export JAR" wizard.

    Otherwise, I think it's the "-m" parameter to jar.

    In any case, once you've got your manifest set up, and your jars in the right place, they should auto load.

    I found it all to be really tricky. Good luck!

    Also, if you're interested in using a db but don't want to really muck about with the db itself, please check out my Persistence plugin! :)
     
  3. Offline

    smartaleq

    I'm getting this same error. I've attempted the instructions you gave nathan, but it still isn't working.

    My manifest is identical to yours, and used when compiling,
    I have my sqlite.jar in /lib/ from where craftbukkit.jar is,
     
Thread Status:
Not open for further replies.

Share This Page