简体   繁体   中英

Java Web Start error: Missing “Permissions” in manifest… but it's there

Trying to make use of Java Web Start. I have a signed jar (signed after modifications of manifest and rebuild), jnlp, and all of it is placed on a non-localhost server.

jnlp is looking like this:

<jnlp spec="1.0+" 
    codebase="http://192.168.101.37/"
    href="transform_player_webstart.jnlp">
<information>
    <title>Transform Player</title>
    <vendor>LCSI</vendor>
</information>
<resources>
    <!-- Application Resources -->
    <j2se version="1.6+"
          href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="player.jar" main="true" />

</resources>
<application-desc
     name="Transform Player"
     main-class="ca.lcsi.Program.App.Player.PlayerStarter">
 </application-desc>
 <update check="background"/>
</jnlp>

Jar manifest has the following:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Permissions: sandbox
Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
Main-Class: ca.lcsi.Program.App.Player.PlayerStarter

Name: ca/lcsi/Program/Media/MediaEventListener.class
SHA1-Digest: ojqbdHWk++FfBoH7VQwCdhk600s=
...
(all other signed entries)

And launching jnlp gives the following error:
Your security settings have blocked an application from running due to missing a "Permissions" manifest attribute in the main jar.

But I have it there! So, what's the catch?

My MANIFEST.MF In my project (using Java 8) - before build artifact and sign:

Manifest-Version: 1.0
Application-Name: SgPrintApplet
Permissions: all-permissions
<blank line>

And in jnlp file, I've added this:

<security>
    <all-permissions/>
</security>

Link here: http://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html#security

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM