2

I'm trying to reproduce the simple Java Web Start demo from Java Web Start Demo using the without codebase example and I'm getting a 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$000(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

I'm using the example code verbatim. Deployment files attached here. Any thoughts?

3
  • 1
    "Any thoughts?" Things have changed a lot since that tutorial was written. It's getting to the stage where an app. won't make it to screen unless the code base is not only specified, but actually listed in the manifest of the main Jar. Commented Feb 4, 2016 at 1:10
  • 1
    Thank you very much. That did the trick. Commented Feb 4, 2016 at 15:28
  • 1
    Glad you got it sorted. Now you might either delete the question or write up (then accept) an answer. I prefer the 2nd option, since it will potentially be of help to others. Commented Feb 4, 2016 at 15:34

1 Answer 1

1

With Andrew Thompson's help I was able to solve my issue. First of all, I had to use the example that used a codebase.
Here is my manifest file:

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

Here is my jnlp file: Dynamic Tree Demo Dynamic Team

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

And the HTML file:

<!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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.