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

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐