Java 罐子似乎不再签名。JARSigningException:找到未签名的条目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19333674/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 16:12:18  来源:igfitidea点击:

jars no longer seem to be signed. JARSigningException: Found unsigned entry

javasecuritynetbeans-7java-web-start

提问by likejudo

NB 7.4RC2, Win 7

NB 7.4RC2,赢7

In Java Control Panel, the "Keep Temporary Internet Files" checkbox is checked.

在 Java 控制面板中,选中了“保留 Internet 临时文件”复选框。

I am signing my Web Start application with trusted certificates. However, the 3rd party jars in dist/lib seem to be unsigned.

我正在使用受信任的证书签署我的 Web Start 应用程序。但是, dist/lib 中的 3rd 方 jars 似乎没有签名。

C:\Program Files (x86)\Java\jdk1.7.0_40\bin\jarsigner" -verify javafx-dialogs-0.0.3.jar

jar is unsigned. (signatures missing or not parsable)

C:\Program Files (x86)\Java\jdk1.7.0_40\bin\jarsigner" - 验证 javafx-dialogs-0.0.3.jar

jar 未签名。(签名丢失或不可解析)

So when I run my application in the debugger, it refuses to start complaining of unsigned jars

因此,当我在调试器中运行我的应用程序时,它拒绝开始抱怨未签名的 jars

ExitException[ 3]com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar

I get the same error when I run with self signed jars, “Found unsigned entry in resource”. It is as if NetBeans stopped signing the jars.

当我使用自签名 jar 运行时,我遇到了同样的错误,“在资源中找到了未签名的条目”。就好像 NetBeans 停止对 jars 进行签名一样。

I deleted all temporary files in the Java cache from Java Control Panel. Now it fails to run clicking both Run and Debug in the IDE, and also copying the dist folder to the desktop and clicking the jnlp file.

我从 Java 控制面板中删除了 Java 缓存中的所有临时文件。现在它无法运行,在 IDE 中单击运行和调试,并将 dist 文件夹复制到桌面并单击 jnlp 文件。

ExitException[ 3]com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: file:/C:/Users/me/Desktop/dist/lib/RXTXcomm.jar

while building:

在构建时:

Warning: The signer certificate will expire within six months. Signing JAR: C:\Users\me\Documents\NetBeansProjects\MyApp\dist\lib\RXTXcomm.jar to C:\Users\me\Documents\NetBeansProjects\MyApp\dist\lib\RXTXcomm.jar as my_key54321

警告:签名者证书将在六个月内到期。将 JAR 签名:C:\Users\me\Documents\NetBeansProjects\MyApp\dist\lib\RXTXcomm.jar 到 C:\Users\me\Documents\NetBeansProjects\MyApp\dist\lib\RXTXcomm.jar 作为 my_key54321

while running:

在跑步的时候:

network: Cache entry found [url: file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar
cache: Resource file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar has expired.
network: ResponseCode for file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar : 200
network: Encoding for file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar : null
CacheEntry[file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar]: updateAvailable=false,lastModified=Wed Feb 04 19:07:10 CST 2009,length=60866

........

…………

security: Trust for: file:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar has ended: Wed Dec 31 18:00:00 CST 1969

安全性:信任:文件:/C:/Users/me/Documents/NetBeansProjects/MyApp/dist/lib/RXTXcomm.jar 已结束:CST 1969 年星期三 12 月 31 日 18:00:00

Does anyone know what is causing this?

有谁知道是什么原因造成的?

Update:In NetBeans, I selected Project Properties and under Run, selected Run As “default configuration”. Earlier, Run As “WebStart” was selected. Now it starts normally. Was it a NetBeans bug or a feature?

更新:在 NetBeans 中,我选择了项目属性,在运行下,选择了作为“默认配置”运行。早些时候,选择了运行方式“WebStart”。现在它正常启动。这是 NetBeans 错误还是功能?

回答by java

WebVPN Java Plugins fail to load after upgrade to Java 7 Update 45 with the following General Exception error - 'com.sun.deploy.net.JARSigningException: Found unsigned entry in resource:

升级到 Java 7 Update 45 后,WebVPN Java 插件无法加载,出现以下一般异常错误 - 'com.sun.deploy.net.JARSigningException:在资源中找到未签名的条目:

Conditions: Windows or Mac OSX machines using Java 7 Update 45.

条件:使用 Java 7 Update 45 的 Windows 或 Mac OSX 计算机。

Workaround: 1) Disable the option 'Keep temporary files on my computer' on the Java Control Panel -> General -> Settings. This works for both Mac OSX and Windows.

解决方法:1) 在 Java 控制面板 -> 常规 -> 设置上禁用“在我的计算机上保留临时文件”选项。这适用于 Mac OSX 和 Windows。

or

或者

2) Downgrade Java to version 7 Update 40 or below

2) 将 Java 降级到版本 7 Update 40 或以下