wood burning stoves 2.0*
The moose likes JNLP and Web Start and the fly likes JNLP error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "JNLP error" Watch "JNLP error" New topic
Author

JNLP error

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

I'm going through a tutorial for loading a JNLP on Tomcat 6.0, and, within my a virtual machine (using Virtual PC 2007) on top of WinXP SP 2, however, when I browse to http://127.0.0.1:8080/calculator/Calculator.jnlp, an error indicates that the JNLP is not valid:
No application resources are specified for this platform. Please contact the vendor of the application to make sure that this is a supported platform
<jnlp spec="1.0+" codebase="http://localhost:8080/calculator/" href="Calculator.jnlp">
<information>
<title>Calculator Demo Application</title>
<vendor>Cay S. Horstmann</vendor>
<description kind="short">A calculator</description>
<icon kind="splash" href="images/calculator_icon.GIF/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6.0+"/>
<jar href="lib/Calculator.jar"/>
</resources>
<application-desc main-class="Calculator" />
</jnlp>

Within ..webapps\calculator the following files are deployed:
\WEB-INF - web.xml
\images - calculator.GIF
\lib - Calculator.jar

web.xml
<?xml version="1.0" encoding="utf-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/ns/j2ee"
xmlns:xsi="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">;
</web-app>
NOTE: the above hyperlink was not intended to appear as a URL, because it is just part of the file that I would like the reader to read.

Source code including the complete web application deployed on Tomcat is also available here. It is noted that I cannot upload .rar or .zip files to this forum.

Do I need to sign the .jar file?

I have also noticed another slight problem when trying to create a signed jar, that was posted to a separate thread.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator.SERVER02>java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)

C:\Documents and Settings\Administrator.SERVER02>


References
1. Core Java Volume I (8th Ed) ISBN:978-0132354769 P.501 to P.503.
2. JAR Signing and Verification Tool, available at here (1.4.2)..

Notes
a. Cannot upgrade to WinXP SP 3 due to a disk space problem on the VM.
b. Tomcat 6 and Tomcat 7 are installed concurrently on the VM, however, only Tomcat 6 appears to be set to start on booting up.


Jon
Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

Copy of exception follows

JNLPException[category: Launch File Error : Exception: null : LaunchDesc:
<jnlp spec="1.0+" codebase="http://localhost:8080/calculator/" href="http://localhost:8080/calculator/Calculator.jnlp">
<information>
<title>Calculator Demo Application</title>
<vendor>Cay S. Horstmann</vendor>
<homepage href="null"/>
<description kind="short">A calculator</description>
<icon href="http://localhost:8080/calculator/images/calculator_icon.GIF/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<java version=" kind="splash"/>
</information>
<update check="timeout" policy="always"/>
<application-desc main-class="Calculator"/>
</jnlp> ]
at com.sun.javaws.Launcher.prepareLaunchFile(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)
 
jQuery in Action, 2nd edition
 
subject: JNLP error
 
Similar Threads
Error while launching jnlp file
missing from the launch file: jnlp
WebStart auto-update doesn't always work properly
Launch Exception encountered in Java Web Start
Doesn't work properly of my JNLP webstart