我在本地网络服务器上有一个小型 webstart 应用程序,可在 localhost:5000/games/game.jnlp 访问,通过 Firefox 和 Chromium 访问它会导致以下错误:
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:312)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:232)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:357)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:330)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
... 2 more
在 Swing 样式错误消息中弹出。
我的 JNLP 文件:
<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0+"
href="game.jnlp"
>
<information>
<title>Space Shapes</title>
<vendor>WorldsProject</vendor>
<homepage href="http://www.worldsproject.org"/>
<description>A game where you must shoot shapes in space.</description>
<description kind="short">A game where you must shoot shapes in space.</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+" max-heap-size="512m"/>
<jar href="game.jar"/>
<jar href="resources.jar"/>
<jar href="slick.jar"/>
<jar href="jogg-0.0.7.jar"/>
<jar href="jorbis-0.0.15.jar"/>
<jar href="lwjgl.jar"/>
<nativelib href="lwjgl-libs.jar"/>
</resources>
<application-desc main-class="org.worldsproject.fluxware.spaceshapes.SpaceShapesGame"/>
</jnlp>
我已确认所有内容均已正确签名
jarsigner -verify -certs -verbose
我用 JaNeLA 查看了 jnlp,所有绿色和黄色消息,完全没有错误。我已经测试了其他 webstarts,所有这些都可以工作,除了我的。
编辑,我所有的罐子和 jnlp 文件的链接:https ://www.dropbox.com/sh/hzagv1e4t4jr43t/WA-LVXp5tc