Results 1 to 3 of 3
  1. #1
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default Having issues accessing JNLP file and webstart

    Hello,

    I get an error when I try to access the JNLP as described at An Example | A JNLP Tutorial: Part 1—An Introduction to JNLP | InformIT and A JNLP Tutorial: Part 2—An Example | A JNLP Launching File | InformIT.

    I'm using Tomcat v7 as a server. Using the code (code.zip in the downloads tab at:Java Deployment with JNLP and WebStart | InformIT), I created web project with Eclipse.

    I accessed the example.jnlp file by using http://localhost:8080/ExampleJNLP/apps/example.jnlp in firefox.

    The server responds with a dialog prompting me to either save the example.jnlp or open it with webstart.

    I select webstart and get a dialog box showing the following exception:

    java.io.FileNotFoundException: http://localhost:8080/apps/example.jnlp
    at sun.reflect.GeneratedConstructorAccessor1.newInsta nce(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run( Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.http://www.protocol.http.HttpURLConn...eption(Unknown Source)
    at sun.net.http://www.protocol.http.HttpURLConn...Stream(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doRequest(Unkn own Source)
    at com.sun.deploy.net.BasicHttpRequest.doRequest(Unkn own Source)
    at com.sun.deploy.net.BasicHttpRequest.doGetRequest(U nknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescript or(Unknown Source)
    at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unkn own Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: http://localhost:8080/apps/example.jnlp
    at sun.net.http://www.protocol.http.HttpURLConn...Stream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    ... 12 more

    Here is an image showing my eclipse project:
    Having issues accessing JNLP file and webstart-examplejnlpproject.png

    What am I doing wrong?

    Stephen
    Last edited by shall; 06-20-2012 at 11:31 PM.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: Having issues accessing JNLP file and webstart

    Your folder containing your JNLP file is 'ExampleJNLP/apps/', the codebase within the JNLP file should reflect this (given the error, I'd suspect the codebase right now says 'http://localhost:8080/apps/')

  3. #3
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default Re: Having issues accessing JNLP file and webstart

    Quote Originally Posted by doWhile View Post
    Your folder containing your JNLP file is 'ExampleJNLP/apps/', the codebase within the JNLP file should reflect this (given the error, I'd suspect the codebase right now says 'http://localhost:8080/apps/')
    Fantastic! I've changed it and it works.

Similar Threads

  1. Enable to create jnlp file
    By saurabhn in forum AWT / Swing
    Replies: 0
    Last Post: 04-12-2011, 11:40 AM
  2. Testing jnlp file locally
    By allelopath in forum Networking
    Replies: 0
    Last Post: 02-12-2011, 04:18 PM
  3. Error message when trying to run a JNLP file
    By dewitrydan in forum New To Java
    Replies: 9
    Last Post: 08-28-2010, 04:42 PM
  4. Replies: 0
    Last Post: 04-28-2010, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •