How to create a jar with external libraries included in Eclipse?

后端 未结 8 1635
北恋
北恋 2020-11-22 10:46

I am done with the project which connects to database (MySQL). Now I want to export the project as jar. But I don\'t know how to include its external dependencies? Is there

8条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 11:20

    If it is a standalone (Main method) java project then Not any specific path put all the jars inside the project not any specific path then right click on the project - > export - > Runnable jar --> Select the lunch configuration and Library handeling then choose the radio button option "Package required libraries into generated jar" -- > Finish.

    Or

    If you have a web project then put all the jars in web-inf/lib folder and do the same step.

提交回复
热议问题