wood burning stoves*
The moose likes JNLP and Web Start and the fly likes Doesn't work properly of my JNLP webstart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Doesn Watch "Doesn New topic
Author

Doesn't work properly of my JNLP webstart

L Kov
Greenhorn

Joined: Jan 30, 2011
Posts: 5
Hi Guys,

I made a little application what I would like to share on the www with JNLP technology webstart.
When I clicked to launch button simply show the browser the content of JNLP file.

What mistake I made?

Here is the URL http://kovaril.fw.hu/calc/launch.html

Here is my jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<!-- JNLP File for Demo of Calculator Application -->
<jnlp
spec="1.0+"
codebase="http://kovaril.fw.hu/calc/"
href="http://kovaril.fw.hu/calc/calc.jnlp">
<information>
<title>Deploy the Calculator demo Java application</title>
<vendor>Copyright (C) by Laszlo. Kovari</vendor>
<homepage href="http://kovaril.fw.hu" />
<description>Demo of Calculator Application</description>
<description kind="short">Deploy the Calculator demo java application</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="Calculator.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="com.monxla.applications.calculator.Calculator"/>
<update check="background"/>
</jnlp>

Do you have any body a tip or trick for fix this problem?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Your web server returns that file with a content-type of "text/plain". This tells the browser it is plain text and so it shows you plain text. Configure your web server to return JNLP files with the appropriate MIME type.

(I don't remember exactly what that is but I'm sure the information is readily available online.)_
L Kov
Greenhorn

Joined: Jan 30, 2011
Posts: 5
Paul Clapham wrote:Your web server returns that file with a content-type of "text/plain". This tells the browser it is plain text and so it shows you plain text. Configure your web server to return JNLP files with the appropriate MIME type.

(I don't remember exactly what that is but I'm sure the information is readily available online.)_


Ok. Thank you.

I put this code another site, where maybe this settings already set.

I got an other error:

JNLParseException[ Could not parse launch file. Error at line 0.]
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.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)

The wrapped exception is:

java.lang.NullPointerException
at com.sun.deploy.xml.XMLParser.parseXMLAttribute(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
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.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)

What need I do in this case?
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

Can you post the exact new JNLP and address. Seems like javaws is not able to find/parse JNLP properly.


SCJP SCWCD AIX SOA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

L Kov
Greenhorn

Joined: Jan 30, 2011
Posts: 5
sourabh girdhar wrote:Can you post the exact new JNLP and address. Seems like javaws is not able to find/parse JNLP properly.


Hello

Here is the address: http://kovaril.fw.hu/calc/launch.html

The JNLP:

<?xml version="1.0" encoding="UTF-8"?>
<!-- JNLP File for Demo of Calculator Application -->
<jnlp
spec="1.0+"
codebase="http://kovaril.fw.hu/calc/"
href="calc.jnlp">
<information>
<title>Deploy the Calculator demo Java application</title>
<vendor>Copyright (C) by Laszlo. Kovari</vendor>
<homepage href="http://kovaril.fw.hu/calc/launch.html" />
<description>Demo of Calculator Application</description>
<description kind="short">Deploy the Calculator demo java application</description>
<offline-allowed/>
</information>
<update check="timeout" policy="always"/>
<resources>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="http://kovaril.fw.hu/calc/Calculator.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="com.monxla.applications.calculator.Calculator"/>
<update check="background"/>
</jnlp>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doesn't work properly of my JNLP webstart