How can I include external jar on my Netbeans project

后端 未结 12 2766
挽巷
挽巷 2020-11-27 06:25

When I run \"clean and build\" the .jar file that is being created only runs if the lib folder is at the same folder of the .jar file.

12条回答
  •  庸人自扰
    2020-11-27 07:04

    This is what worked for me:

    I built in excel export functionality into my project. The 2 external .jars I used for this purpose was jxl.jar end sx.jar

    Unpack these 2 jars into a folder(java classes) using 7-Zip without any META files. Unpack your project jar into the same folder including the META file.

    Re-Pack the whole java classes folder using JARMaker to recreate your Project .jar in its original distribution folder ... and there you go ... full excel functionality.

提交回复
热议问题