Too long line in manifest file while trying to create jar

后端 未结 5 846
北荒
北荒 2021-01-04 02:22

I am getting a too long line error while trying to build a jar. the long line in the manifest file is the Class-Path line as the application uses a lot of third-party libra

5条回答
  •  粉色の甜心
    2021-01-04 02:27

    The classpath is too long due to the number of jar files in it. «No line may be longer than 72 bytes (not characters), in its UTF8-encoded form.» [from docs: java 5, java 8; «Line length» section].

    use as the following way to resolve the problem:

    (1) use separate lines, to avoid too long a line for java package name lists

    (2) type a preceding space before each folloing lines, for example:

    Class-Path:
     ...jar
     ...jar
     ...jar
    

提交回复
热议问题