我正在尝试使用IntelliJ创建一个可运行的JAR文件。 我遵循了本教程:Quickly create Jar artifact for application 我有很多第三方库。
不幸的是我收到了以下错误:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
我使用Eclipse从同一个项目创建了一个JAR,除了META-INF / MANIFEST.MF之外,一切都是相同的。
IntelliJ JAR中的MANIFEST.MF:
Manifest-Version: 1.0
Class-Path: .
Main-Class: com.continental.ref.REFController
Eclipse JAR中的MANIFEST.MF:
Manifest-Version: 1.0
Class-Path: .
Main-Class: com.continental.ref.REFController
Name: org/apache/commons/collections/map/AbstractLinkedMap$LinkMapIter
ator.class
SHA1-Digest: +GMX4XDNU3rbmKNHyTmYDlZT44Q=
Name: org/apache/commons/beanutils/converters/SqlTimeConverter.class
SHA1-Digest: kKXUmTycgy5F07EuojB2tsz9424=
Name: org/apache/commons/collections/bidimap/TreeBidiMap$Node.class
SHA1-Digest: g1+1ao8G8CPfvRmMi61ThauUVGU=
Name: org/apache/commons/collections/comparators/TransformingComparato
r.class
SHA1-Digest: bd4hdiKvX/OSymUta0Tv5ucbwDQ=
...
我真的没有任何IDEA如何强制IntelliJ来计算库的哈希值。
提前感谢您的帮助!