In Linux, how to execute Java jar file with external jar files?

后端 未结 2 608
温柔的废话
温柔的废话 2021-01-12 05:04

In Linux, how to execute Java jar file with external jar files?

2条回答
  •  无人共我
    2021-01-12 05:39

    java -jar /path/to/externalJarFile.jar
    

    Update

    You can add the required library in manifest with Class-Path: header

    For example :

    Class-Path: MyUtils.jar
    

    See

    • Adding Classes to the JAR File's Classpath

提交回复
热议问题