我使用有效的代码签名证书签署了我的自定义JAR,但仍然遇到了这种错误。
Your security settings have blocked an application from running due to missing a "Permission" manifest attribute in the main jar.
贝洛是我的样本JNLP
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for CardBuilder Application -->
<jnlp spec="1.0+" codebase="http://www.testpath.com/CardBuilder/" >
<information>
<title>Card Builder</title>
<vendor>cardbuilder</vendor>
<description>Allows you to design a cards</description>
<description kind="short"></description>
<icon href="builder_icon.gif" />
<shortcut online="true">
<desktop/>
<menu submenu="testpath.com"/>
</shortcut>
<offline-allowed/>
<association mime-type="application-x/crd-file" extensions="crd"/>
</information>
<resources>
<j2se version="1.6+" java-vm-args="-Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -Xmx512M"/>
<jar href="MyCards.jar"/>
<extension name="jaxen-1.1" href="jaxen-1.1.jnlp"/>
<extension name="jdom" href="jdom.jnlp"/>
<extension name="looks-2.1.1" href="looks-2.1.1.jnlp"/>
<extension name="saxpath" href="saxpath.jnlp"/>
<extension name="forms-1.0.7" href="forms-1.0.7.jnlp"/>
<extension name="log4j-1.2.8" href="log4j-1.2.8.jnlp"/>
<jar href="commons-logging.jar"/>
<jar href="commons-codec-1.3.jar"/>
<jar href="commons-httpclient-3.0.1.jar"/>
<jar href="Poker.jar" download="lazy"/>
<jar href="BridgeStyle.jar" download="lazy"/>
<jar href="Blank.jar" download="lazy"/>
<jar href="fonts.jar"/>
<jar href="Filters.jar"/>
</resources>
<security>
<all-permissions/>
</security>
<application-desc main-class="com.cards.CardsUI"/>
</jnlp>
这是我的清单文件。
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Application-Name: Card Builder
Codebase: *
Permission: all-permissions
Created-By: 1.5.0_09-b03 (Sun Microsystems Inc.)