Java 网络启动 - NullPointerException

Java Web Start - NullPointerException

我正在尝试使用 without codebase 示例从 Java Web Start Demo 重现简单的 Java Web Start 演示,但我收到 NullPointerException

java.lang.NullPointerException at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main.access[=11=]0(Unknown Source) at com.sun.javaws.Main.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

我正在逐字使用示例代码。附加的部署文件 here。 有什么想法吗?

在 Andrew Thompson 的帮助下,我解决了我的问题。首先,我必须使用使用代码库的示例。
这是我的清单文件:

Permissions: sandbox
**Codebase: localhost:8080/java-web-start**
Application-Name: Dynamic Tree Demo

这是我的 jnlp 文件: 动态树演示 充满活力的团队

    </resources>
    <application-desc
         name="Dynamic Tree Demo Application"
         main-class="webstartComponentArch.DynamicTreeApplication">
     </application-desc>
     <update check="background"/>
</jnlp>

和 HTML 文件:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en-US">
  <head>
    <title>Dynamic Tree Java Web Start Application Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  </head>
  <body>
    <h1>Dynamic Tree Java Web Start Application Demo</h1>

    <script src="https://www.java.com/js/deployJava.js"></script>
    <script>        
        var url = "**http://localhost:8080/java-web-start/dynamictree_webstart.jnlp**";
        deployJava.createWebStartLaunchButton(url, '1.6.0');
    </script>
    <noscript>JavaScript is required for this page.</noscript>

  </body>
</html>