• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Doesn't work properly of my JNLP webstart

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 28295
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Ranch Hand
Posts: 81
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the exact new JNLP and address. Seems like javaws is not able to find/parse JNLP properly.
 
L Kov
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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>
 
catch it before it slithers away! Oh wait, it's a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic