缺少代码库清单属性:xxx.jar [英] Missing Codebase manifest attribute for:xxx.jar

查看:24
本文介绍了缺少代码库清单属性:xxx.jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 jnlp 启动应用程序时,我收到消息

When I launch application from jnlp I receive message

"缺少代码库清单属性:xxx.jar"

什么意思?

推荐答案

在将我的 JRE 更新到 1.7u25 后运行内部应用程序时也遇到了这个问题.出现警告是因为 1.7u25 中引入了一项新的安全功能,以防止未经授权的代码重用.就我而言,我还看到了一个对话框,要求我确认我希望该应用程序能够访问我的 PC.

Just encountered this, too, when running an internal application after updating my JRE to 1.7u25. The warnings appear because of a new security feature introduced in 1.7u25 to prevent unauthorized code reuse. In my case, I was also presented with a dialog asking me to confirm that I wanted the application to have access to my PC.

如果您有权访问 jar 文件,请为其添加两个属性:PermissionsCodebase.您需要决定应用程序是否需要访问 PC 上的所有内容,在这种情况下,您可以为 Permissions 属性使用值 all-permissions.否则,使用 sandbox 并且 JRE 将限制代码在 PC 上的访问级别.Codebase 可能需要与 jnlp 文件的代码库相同,除非该 jar 文件是从不同的 URL 下载的,在这种情况下,它需要是那个 URL.

If you have access to the jar file, add two attributes to it: Permissions and Codebase. You need to decide if the application requires access to everything on the PC, in which case you would use the value all-permissions for the Permissions attribute. Otherwise, use sandbox and the JRE will restrict the code's access level on the PC. Codebase probably needs to be the same as the codebase for the jnlp file, unless that jar file is being downloaded from a different URL, in which case it needs to be that URL.

参考:Oracle 的 Java 7 文档

这篇关于缺少代码库清单属性:xxx.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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