1

我有一个 jnlp 文件

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:///homes/rm3710/SelfAssessment" href="selfAssessment.jnlp">
    <information>
        <title>Dynamic Tree Demo</title>

        <offline-allowed/>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.6+" href=
           "http://java.sun.com/products/autodl/j2se"/>
        <jar href="test.jar"
            main="true" />

    </resources>
    <application-desc
         name="Dynamic Tree Demo Application"
         main-class="logic.MyApplication"
         width="300"
         height="300">
     </application-desc>
     <update check="background"/>
</jnlp>

我已将此文件、html 文件和包含我的 swing 应用程序的 test.jar 放入一个文件夹中。我正在尝试使用 Java WebStart。当我单击启动按钮时,出现以下错误消息

net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not
read or parse the JNLP file.    at
net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:491)    at
net.sourceforge.jnlp.Launcher.launch(Launcher.java:283)     at
net.sourceforge.jnlp.runtime.Boot.run(Boot.java:202)    at
net.sourceforge.jnlp.runtime.Boot.run(Boot.java:51)     at
java.security.AccessController.doPrivileged(Native Method)  at
net.sourceforge.jnlp.runtime.Boot.main(Boot.java:168) Caused by:
java.io.IOException: /homes/rm3710/SelfAssessment/Untitled Document
1/selfAssessment.jnlp (Not a directory)     at
net.sourceforge.jnlp.JNLPFile.openURL(JNLPFile.java:282)    at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:212)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:188)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:173)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:159)     at
net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:477)    ... 5 more
Caused by:  java.io.IOException: /homes/rm3710/SelfAssessment/Untitled
Document 1/selfAssessment.jnlp (Not a directory)    at
net.sourceforge.jnlp.JNLPFile.openURL(JNLPFile.java:282)    at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:212)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:188)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:173)     at
net.sourceforge.jnlp.JNLPFile.<init>(JNLPFile.java:159)     at
net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:477)    at
net.sourceforge.jnlp.Launcher.launch(Launcher.java:283)     at
net.sourceforge.jnlp.runtime.Boot.run(Boot.java:202)    at
net.sourceforge.jnlp.runtime.Boot.run(Boot.java:51)     at
java.security.AccessController.doPrivileged(Native Method)  at
net.sourceforge.jnlp.runtime.Boot.main(Boot.java:168)
4

0 回答 0