JNLP - Launch File Error

S

Subhash

Below is the jnlp file and the error I get on launching it. I am not
sure what the problem is. All files (.jnlp, .jar, etc) are in the same
folder and the jar file works perfectly fine. Using Apache, Tomcat and
XP Pro.

Please help. Thanks.

--- JNLP ---
<jnlp spec="1.0+"
codebase="http://localhost/test/" href="BrowserLauncher.jnlp">
<information>
<title>BrowserLauncher</title>
<description>Lauches your default browser</description>
</information>
<resources>
<j2se version="1.2+" />
<jar href="BrowserLauncher.jar" />
</resources>
</jnlp>
--- END ---


--- ERROR ---
An error occurred while launching/running the application.
Category: Launch File Error
The following required field is missing from the launch file: <jnlp>

MissingFieldException[ The following required field is missing from
the launch file: <jnlp>]
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown
Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown
Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown
Source)
at com.sun.javaws.Main.main(Unknown Source)
--- END ---
 
S

Shane Mingins

Subhash said:
Below is the jnlp file and the error I get on launching it. I am not
sure what the problem is. All files (.jnlp, .jar, etc) are in the same
folder and the jar file works perfectly fine. Using Apache, Tomcat and
XP Pro.

Looking at the message there is an element in the JNLP file missing .... I
cannot recall which are required/optional ... perhaps find the spec to find
out.

I would add some missing elements to at least get it working. The example
below (which launches from a file server) works for me. Maybe it is of some
help.



<?xml version="1.0"?>
<jnlp spec="1.0+" codebase="file:///x:/Apps/javaapps/test//cmaAutoPilot"
href="cmaAutoPilot.jnlp">
<information>
<title>CMA AutoPilot</title>
<vendor>Assure (NZ) Limited</vendor>
<homepage href="/Apps/javaapps/test/cmaAutoPilot"/>
<description>CMA Automatic Reconilliation Application</description>
<description kind="short">CMA Automation</description>
<icon href="autopilot_icon.gif" kind="splash"/>
<icon href="autopilot_icon.gif"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="cmaAutoPilot-20040524.jar"/>
<jar href="../lib/calibre-2.12.10/calibre.jar"/>
<jar href="../lib/jtOpen-4.2/lib/jt400.jar"/>
<jar href="../lib/lookandfeel/plastic-1.2.1.jar"/>
</resources>
<application-desc
main-class="com.assureinternational.autopilot.ApplicationStartTest"/>
</jnlp>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top