问题背景:使用Maven开发一个SWT的小程序,使用maven-shade-plugin打包应用程序有主类。
出现错误,Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
Could not find the main class: com.XXX.YYY.ZZZ. Program will exit.
在网上找了不少解决方案,最后找到这个:
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<!-- Additional configuration. -->
</configuration>
需要把上面这段加到插件的运行配置里面。
原因:因为引用的版本的签名文件造成了版本混淆,实际上只需要排除即可。
分享到:
相关推荐
在与银联的对接中,调试过程中报错或使用类似登入加密:java.lang.SecurityException: JCE cannot authenticate the provider BC 进行问题解决,里面包含 bcprov-jdk16-143.jar与bcprov-jdk15-135.jar与具体文件存放...
NULL 博文链接:https://lwpsoft.iteye.com/blog/2254348
Android Media...1、解决Android Q中java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 异常 2、targetSdk 32可用
J2ee直接访问数据库步骤
org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.openssl.PEMReader$...
NULL 博文链接:https://duanfei.iteye.com/blog/2437258
Android5.0之后,利用MediaProjection实现录屏功能。
1980-2005年 全国各省经济数据,好数据的啊,请下载,各位网友
很多资源下载下来的jar会导致邮件发送运行报错,此处所提供的jar包经过代码实验!
Neo4j Java Reference 3.0
如果自己的service可以在别package中被引用,需要在manifest文件中把此service的android:exported属性设置为true,否则会导致引用时异常Android: java.lang.SecurityException: Permission Denial
hibernate3.1和struts1.2构建网站时出现 如下错误提示:“java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of ...
百度lbs定位jar包 解决使用2.6的jar包时部分机型报错 ...E/AndroidRuntime(5032): java.lang.SecurityException: Not allowed to bind to service Intent { act=com.baidu.location.service_v2.6 } 更换2.6.c的jar包
c++Exception Handling: A False Sense of SecurityException Handling: A False Sense of SecurityException Handling: A False Sense of Security
将安全例外添加到APK 在Android 7.0中,Google引入了对用户证书颁发机构(CA)信任方式的更改。 这些更改可防止第三方监听来自应用程序的网络请求:更多信息: 该脚本注入了APK网络安全例外,该例外使第三方软件...
05-27 15:35:11.487 E/AndroidRuntime( 2352): java.lang.RuntimeException: Unable to create service com.android.systemui.keyguard.KeyguardService: java.lang.SecurityException: read wallpaper: Neither ...
System.Security.SecurityException:“未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security 需要判断当前是否已经存在日志,下面我来创建一个事件叫 “德熙” if (EventLog.SourceExists("德熙"))...
jolla-aliendalvik-internet-test 互联网测试: 与 Alien Dalvik 一起在 Jolla 上工作, 在真正的 android 设备(经过测试的 Galaxy S4)上崩溃,异常:java.lang.SecurityException:权限被拒绝(缺少 INTERNET ...
(会抛异常:java.lang.SecurityException: Neither user xxxxx nor current process has android.permission.MODIFY_PHONE_STATE.) 原因:android2.3版本及以上android.permission.MODIFY_PHONE_STATE权限限制已经...
由于一个模糊的冲突,那些使用 Hamcrest 的人失败了:java.lang.SecurityException: class "org.hamcrest.Matchers" 的签名者信息与同一包中其他类的签名者信息不匹配使用 Maven 3.x 构建工作并且所有测试都通过。...