How do I include external JARs in my own Project JAR

前端 未结 6 1250
无人共我
无人共我 2021-02-20 07:26

I have a Java application and created a JAR file and deployed it.

The App uses external JARs such as the Log4J JAR. When creating my JAR file, how do I include all ext

6条回答
  •  无人共我
    2021-02-20 07:51

    If you use Eclipse, You can extract all included files into one runnable jar like this:

    1. Right click on your project name from Package Explorer and select Export.
    2. In Export screen, select Java -> Runnable JAR file and Next.
    3. Fill in the Runnable JAR File Spec screen and Finish.

    You can choose whether to package dependency jars as individual jar files or extract them into the generated JAR.

提交回复
热议问题