Results 1 to 10 of 10
  1. #1
    dewitrydan is offline Member
    Join Date
    Aug 2010
    Posts
    67
    Rep Power
    0

    Default Error message when trying to run a JNLP file

    I am following "java in 21 days"
    I am dealing with JNLP files.
    I try to access the JNLP file through the internet browser.
    but get this error mesage:

    I've also uploaded the code in a zip file.
    Can you tell me where I am going wrong and hwo to get it to work?
    Thanks
    Attached Files Attached Files

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default

    1) What does "java -version" give you when you issue this command at a Command Prompt?
    2) What do you have in the .jnlp file's "j2se version" tag?

    db
    Last edited by DarrylBurke; 08-27-2010 at 09:56 PM.

  3. #3
    dewitrydan is offline Member
    Join Date
    Aug 2010
    Posts
    67
    Rep Power
    0

    Default





    Java Code:
    <j2se version="1.56"/>
    thanks :)

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Also check this: codebase="http://www.cadenhead.org/book/java-21-days/java"

    Where is the jar file located? If on your disk, change above to:

    codebase="."

  5. #5
    dewitrydan is offline Member
    Join Date
    Aug 2010
    Posts
    67
    Rep Power
    0

    Default

    Yep, it's run on the hard disk, I've changed the code to what you said:
    Java Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for the PageData Application -->
    <jnlp
      codebase="."
      href="PageData.jnlp">
      <information>
        <title>PageData Application</title>
        <vendor>Rogers Cadenhead</vendor>
        <homepage href="http://www.java21days.com"/>
        <icon href="pagedataicon.gif"/>
        <offline-allowed/>
      </information>
      <resources>
        <j2se version="1.56"/>
        <jar href="PageData.jar"/>
      </resources>
      <security>
        <all-permissions/>
      </security>
      <application-desc main-class="PageData"/>
    </jnlp>

    But get this exception:
    Java Code:
    JNLPException[category: System Configuration : Exception: null : LaunchDesc: 
    <jnlp spec="1.0+" codebase="file:/D:/Users/test/Desktop/java_prob/" href="file:/D:/Users/test/Desktop/java_prob/PageData.jnlp">
      <information>
        <title>PageData Application</title>
        <vendor>Rogers Cadenhead</vendor>
        <homepage href="http://www.java21days.com"/>
        <icon href="file:/D:/Users/test/Desktop/java_prob/pagedataicon.gif" kind="default"/>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="timeout" policy="always"/>
      <resources>
        <java version="1.56"/>
        <jar href="file:/D:/Users/test/Desktop/java_prob/PageData.jar" download="eager" main="false"/>
      </resources>
      <application-desc main-class="PageData"/>
    </jnlp> ]
    	at com.sun.javaws.Launcher.downloadJREResource(Unknown Source)
    	at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    	at com.sun.javaws.Launcher.prepareAllResources(Unknown 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)

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    I get a different error when trying to launch the JNLP file:
    Java Web Start 1.6.0_20
    Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Owner
    ...
    #### Java Web Start Error:
    #### Found unsigned entry in resource: file:/D:/JavaDevelopment/Testing/JNLP/java problem/PageData.jar

    com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: file:/D:/JavaDevelopment/Testing/JNLP/java_problem/PageData.jar
    at com.sun.javaws.security.SigningInfo.getCommonCodeS ignersForJar(Unknown Source)
    at com.sun.javaws.security.SigningInfo.check(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources Helper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources (Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknow n 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)
    My .jnlp file:
    Java Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for the PageData Application  NB: changed version from 1.56 to 1.6-->
    <jnlp
      codebase="."
      href="PageData.jnlp">
      <information>
        <title>PageData Application</title>
        <vendor>Rogers Cadenhead</vendor>
        <homepage href="http://www.java21days.com"/>
        <icon href="pagedataicon.gif"/>
        <offline-allowed/>
      </information>
      <resources>
        <j2se version="1.6"/>
        <jar href="PageData.jar"/>
      </resources>
      <security>
        <all-permissions/>
      </security>
      <application-desc main-class="PageData"/>
    </jnlp>

  7. #7
    dewitrydan is offline Member
    Join Date
    Aug 2010
    Posts
    67
    Rep Power
    0

    Default

    oh :/
    What do you suggest the code should be to get it working? thanks

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Try removing the security section (3 lines). The following works for me:
    Java Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for the PageData Application  NB: changed version from 1.56 to 1.6-->
    <jnlp
      codebase="."
      href="PageData.jnlp">
      <information>
        <title>PageData Application</title>
        <vendor>Rogers Cadenhead</vendor>
        <icon href="pagedataicon.gif"/>
        <offline-allowed/>
      </information>
      <resources>
        <j2se version="1.6"/>
        <jar href="PageData.jar"/>
      </resources>
      <application-desc main-class="PageData"/>
    </jnlp>

  9. #9
    dewitrydan is offline Member
    Join Date
    Aug 2010
    Posts
    67
    Rep Power
    0

    Default

    holy mother
    it works
    thanks allot!!! :D

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Its one of those magical mysteries until we understand how JNLP works.

Similar Threads

  1. Replies: 0
    Last Post: 04-28-2010, 03:33 PM
  2. Replies: 5
    Last Post: 07-26-2009, 03:37 PM
  3. Error Message when reading an input file.
    By Deluyxe in forum New To Java
    Replies: 8
    Last Post: 04-26-2009, 04:02 PM
  4. Replies: 7
    Last Post: 08-12-2007, 03:47 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
  •