运行由fat jar打包后的jar文件出现警告的处理方法

在运行有fat jar打包的JAR文件时控制台出现各种警告:

008-12-2 8:55:20 java.util.jar.Attributes read
警告: Duplicate name in Manifest: SHA1-Digest.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
2008-12-2 8:55:20 java.util.jar.Attributes read
警告: Duplicate name in Manifest: SHA1-Digest.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.

问题原因:
在MANIFEST.MF文件中,有多个SHA1-Digest,导致控制台报错

解决方法:
在用fat jar打包时,取消“merge individual-sections of all MANIFEST.MF files”选项,然后其他操作照旧,这样就可以了

你可能感兴趣的:(jar,merge)