Search code examples
jnlpjava-web-start

Browser showing content of jnlp file


I made small sample example in jws that is running on local machine. I have tested in mozilla browser. But when I put this example on server then and trying to access .jnlp file then it is showing only content of .jnlp file. I have looked every where on internet they are saying that .jnlp file must be associate with java web start. File types already associate in my machine. So please help me how to overcome of this problem.

This is my HelloWorld.jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://67.227.202.160/~koder/demo" href="HelloWorld.jnlp">
    <information>
        <title>Hello World Demo</title>
        <vendor>Dynamic Team</vendor>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.6+"
              href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="HelloWorld.jar" main="true"/>

    </resources>
    <application-desc
         name="Hello World Demo"
         main-class="HelloWorld.HelloWorld">
     </application-desc>
     <update check="background"/>
</jnlp>

Solution

  • You have to set your applications associations in Firefox. Go to the Firefox button (the one in the topleft corner), options -> options, applications tab and set the .jnlp extension to the sun java web start launcher.