“无效的签名文件”当试图运行.jar时 [英] "Invalid signature file" when attempting to run a .jar

查看:126
本文介绍了“无效的签名文件”当试图运行.jar时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的java程序打包在一个jar文件中,并使用外部jar库, bouncy castle 。我的代码编译得很好,但运行jar会导致以下错误:

My java program is packaged in a jar file and makes use of an external jar library, bouncy castle. My code compiles fine, but running the jar leads to the following error:

线程main中的异常java.lang.SecurityException:无效的签名文件摘要显示主要属性

我用谷歌搜索了一个多小时寻找解释并发现很少有价值。如果有人以前看过这个错误并且可以提供一些帮助,我将不得不承担责任。

I've googled for over an hour searching for an explanation and found very little of value. If anyone has seen this error before and could offer some help, I would be obliged.

推荐答案

此处列出的解决方案可能会提供指针。

The solution listed here might provide a pointer.


Manifest主要属性的签名文件摘要无效

底线:


最好将官方jar保留为
,并将其作为依赖项添加到$ b的清单文件中$ b应用程序jar文件。

It's probably best to keep the official jar as is and just add it as a dependency in the manifest file for your application jar file.

这篇关于“无效的签名文件”当试图运行.jar时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆