由于java缺少权限,执行jnlp文件时出现SecurityException(主jar中缺少必需的权限清单属性)...

OS: Windows 7 64 bit

Java: jdk1.7.0_51

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 File Manifest Attributes for Security

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

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 Attribute

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 - requires access to the user's system resources.

Changes to Security Slider:

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

Block Self-Signed and Unsigned applets on High Security Setting

Require Permissions Attribute for High Security Setting

Warn users of missing Permissions Attributes for Medium Security Setting

For more information, see Java Control Panel documentation.

cxMoZ.jpg

sample MANIFEST.MF

Manifest-Version: 1.0

Ant-Version: Apache Ant 1.8.3

Created-By: 1.7.0_51-b13 (Oracle Corporation)

Trusted-Only: true

Class-Path: lib/plugin.jar

Permissions: sandbox

Codebase: http://myweb.de http://www.myweb.de

Application-Name: summary-applet

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值