Java SecurityException:签名者信息不匹配 [英] Java SecurityException: signer information does not match

查看:861
本文介绍了Java SecurityException:签名者信息不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我照常重新编译我的类,突然得到以下错误消息。为什么?我如何解决它?

I recompiled my classes as usual, and suddenly got the following error message. Why? How can I fix it?

java.lang.SecurityException: class "Chinese_English_Dictionary"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)


推荐答案

当属于同一包的类从不同的JAR文件加载时,会发生这种情况,这些JAR文件具有使用不同证书签名的签名 - 或者更经常地,是签名的,一个或多个其他的不是(其中包括从目录加载的类,因为那些AFAIK不能签名)。

This happens when classes belonging to the same package are loaded from different JAR files, and those JAR files have signatures signed with different certificates - or, perhaps more often, at least one is signed and one or more others are not (which includes classes loaded from directories since those AFAIK cannot be signed).

所以要么确保所有JAR包含来自相同包的类)使用相同的证书签名,或从具有重叠包的JAR文件的清单中删除签名。

So either make sure all JARs (or at least those which contain classes from the same packages) are signed using the same certificate, or remove the signatures from the manifest of JAR files with overlapping packages.

这篇关于Java SecurityException:签名者信息不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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