执行 jnlp 文件期间出现安全异常(主 jar 中缺少必需的权限清单属性) [英] SecurityException during executing jnlp file (Missing required Permissions manifest attribute in main jar)

查看:128
本文介绍了执行 jnlp 文件期间出现安全异常(主 jar 中缺少必需的权限清单属性)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Windows 7 64 位

OS: Windows 7 64 bit

Java:jdk1.7.0_51

Java: jdk1.7.0_51

我有一个 jnlp 文件.当我双击它时,出现如下异常:

I have a jnlp file. When I double click on this, exception is occurred as below:

Application Error: Unable to launch the application
Exception: java.lang.SecurityException: Missing required Permissions manifest attribute in main jar

推荐答案

用于安全的 JAR 文件清单属性

JAR 文件清单 包含有关 JAR 文件内容的信息,包括安全和配置信息.

The JAR file manifest contains information about the contents of the JAR file, including security and configuration information.

在签署 JAR 文件之前将属性添加到清单.
请参阅 Java 教程中的修改清单文件,了解有关向 JAR 清单文件添加属性.

Add the attributes to the manifest before the JAR file is signed.
See Modifying a Manifest File in the Java Tutorial for information on adding attributes to the JAR manifest file.

权限属性

Permissions 属性用于验证 RIA 在运行时请求的权限级别是否与创建 JAR 文件时设置的权限级别匹配.

The Permissions attribute is used to verify that the permissions level requested by the RIA when it runs matches the permissions level that was set when the JAR file was created.

使用此属性有助于防止有人重新部署使用您的证书签名的应用程序并以不同的权限级别运行它.将此属性设置为以下值之一:

Use this attribute to help prevent someone from re-deploying an application that is signed with your certificate and running it at a different privilege level. Set this attribute to one of the following values:

  • 沙箱 - 在安全沙箱中运行,不需要额外权限.

  • sandbox - runs in the security sandbox and does not require additional permissions.

all-permissions - 需要访问用户的系统资源.

all-permissions - requires access to the user's system resources.

对安全滑块的更改:

此版本 (7u51) 中包含对安全滑块的以下更改:

The following changes to Security Slider were included in this release(7u51):

  • 在高安全设置下阻止自签名和未签名的小程序
  • 需要高安全性设置的权限属性
  • 警告用户缺少中等安全设置的权限属性

有关详细信息,请参阅 Java 控制面板 文档.

For more information, see Java Control Panel documentation.

示例 MANIFEST.MF

清单版本:1.0
Ant 版本:Apache Ant 1.8.3
创建者:1.7.0_51-b13(甲骨文公司)
仅受信任:真实
类路径:lib/plugin.jar
权限:沙盒
代码库:http://myweb.de http://www.myweb.de
应用程序名称:摘要小程序

这篇关于执行 jnlp 文件期间出现安全异常(主 jar 中缺少必需的权限清单属性)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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