Java Applet 安全警告“JAR 文件清单不包含权限属性"是什么意思? [英] What does the Java Applet security warning "JAR file manifest does not contain the Permissions attribute"mean?

查看:32
本文介绍了Java Applet 安全警告“JAR 文件清单不包含权限属性"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Java Applet,它需要访问客户端的本地文件系统.我为我自己创建了一个简单的证书(它未经 Verisign、Commodo 等认证).我使用以下模板为 jar 签名:

I have a Java Applet which needs access to the local filesystem of the client. I have created a simple certificate for my own (it is NOT certified by Verisign,Commodo, ...). I signed the jar with the following template:

del \Users\koalabruder\.keystore
"C:\Program Files\Java\jdk1.7.0_45\bin\keytool" -genkey -alias %1 -keypass kp -dname "cn=inin" -storepass ab987c
"C:\Program Files\Java\jdk1.7.0_45\bin\jarsigner.exe" -storepass abc -keypass kp %2 %1
"C:\Program Files\Java\jdk1.7.0_45\bin\keytool" -export -storepass abc -alias %1 -file %3

关于我没有签名证书"的简单安全警告已经存在多年,这不是我的问题.

The simple security warning that I have "no signed certificate" has been in existence for years and is not my problem.

我的问题是,安全警告已更改,因为最近的 Java 更新之一:

My problem is, that the security warning changed because one of the last Java updates:

此应用程序将在未来的 Java 安全更新中被阻止,因为 JAR 文件清单不包含 Permissions 属性.请联系出版商了解更多信息.

This application will be blocked in a future Java security update because the JAR file manifest does not contain the Permissions attribute. Please contact the Publisher for more Information.

什么意思?我该如何解决?一定要买证书吗?我是否必须修复清单 (MANIFEST.MF)?什么是权限属性?

What does it mean? How can I fix it? Do I have to buy a certificate? Do I have to fix the Manifest (MANIFEST.MF)? What is the Permission attribute?

更新:这是我的 jar 文件清单

Update: Here is my Manifest from the jar file

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Application-Name: inin 
Permissions: all-permissions 
Created-By: 1.7.0_45-b18 (Oracle Corporation)

Name: net/inin/transfer/ul/UlPanel.class
SHA-256-Digest: asdfasddddddddddddddddddddddddddddddddd=

推荐答案

您不需要购买证书,只需修复清单文件即可.

You don't need to buy a certificate, just fix the manifest file.

添加这一行:

permissions: all-permissions

如果您只需要有限的访问权限,请使用此行:

Or this line if you need only limited access:

permissions: sandbox

这篇关于Java Applet 安全警告“JAR 文件清单不包含权限属性"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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