我有一个简单的 HelloWorld 小程序,我将它嵌入到 HTML 中。它工作得很好。但是我将小程序放入 jar 并签署了 jar,但它没有加载说“无法支持自签名 jar”我正在使用 ICA 颁发的证书进行签名。此外,在 1.7.51 版本之前,我们从未遇到过这个问题。顺便说一句:我浏览了有关添加参数的 Oracle 文档
根据它,我尝试在签名的 MANIFEST.MF 中添加以下属性,即:权限:沙箱,受信任的库:true 但这也没有帮助。我不确定我错过了什么。
清单看起来像这样:
Manifest-Version: 1.0
Trusted-Library: true
Permissions: all-permissions
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
Codebase: *
Created-By: 1.7.0_45 (Oracle Corporation)
Name: HelloWorld$1.class
SHA1-Digest: xcxzcbxzcbxzcbxzcb=
Name: HelloWorld.class
SHA1-Digest: xaadfasfdasdfsafd=
添加控制台日志:
com.sun.deploy.security.BlockedException: Your security settings have blocked a self-signed application from running
at com.sun.deploy.security.SandboxSecurity.showBlockedDialog(Unknown Source)
at com.sun.deploy.security.TrustDecider.askUser(Unknown Source)
at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
谢谢。乙脑