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

查看:59
本文介绍了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天全站免登陆