External libraries integrated inside exported jar?

Discussion in 'Plugin Development' started by Unica, May 7, 2015.

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

    Unica

    Good day,

    I'm using a library called Reflections for my minecraft plugin, and I have found an problem, which I
    cannot seem to fix.

    When I add this library to my 'Referenced Libraries', I can use it in my code. However, once
    I export the plugin for my server, I get a ClassNotFoundException, because the library is not integrated
    in the plugin, I think.

    Any ways how I can use this library inside my code, and export it into one single jar, without having to download .jar repacking plugins or whatnot?

    I'm using eclipse.
     
  2. Right click your project and click "Properties", then go to java build path and then click order and export at the top, and check the projects you want to export with the project
     
  3. Offline

    Unica

    @megamichiel

    Still :/ ClassNotFoundException: org.reflections.Reflections
     
  4. Offline

    meguy26

    @Unica
    Are you using maven?
    If you are, it needs to be configured specifically for this, and unfortunately I do not know how.

    Otherwise, when exporting the .jar, be sure to select the right options as mentioned in
    @megamichiel's post
     
Thread Status:
Not open for further replies.

Share This Page