• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

JNLP error

 
Ranch Hand
Posts: 664
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 Camilleri
Ranch Hand
Posts: 664
Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
reply
    Bookmark Topic Watch Topic
  • New Topic