Steps for Java Web Start

  1. Make jar file of your class files and resources like icons, images etc. using following command:
    jar cf JarFileToCreate.jar abc.class def.class ...
    For More details on creating Jar files, see create-jar-file-for-java-app
  2. Make jnlp extension text file with following information:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost/jnlp" href="MyApp.jnlp">
        <information>
            <title>My App Title</title>
            <vendor>MonishVendor</vendor>
        </information>
        <resources>
            <!-- Application Resources -->
            <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
            <jar href="TestApp.jar" main="true" />
    
        </resources>
        <application-desc
             name="DemoName"
             main-class="GUI_QPDownloader"
             width="300"
             height="300">
         </application-desc>
         <update check="background"/>
    </jnlp> 
  3. That's all. Now run jnlp file from any web-browser to test

    How to create jar file for the java app you make.

    Modifying a Manifest File

    You use the m command-line option to add custom information to the manifest during creation of a JAR file. This section describes the m option. The Jar tool automatically puts a default manifest with the pathname META-INF/MANIFEST.MF into any JAR file you create. You can enable special JAR file functionality, such as package sealing, by modifying the default manifest. Typically, modifying the default manifest involves adding special-purpose headers to the manifest that allow the JAR file to perform a particular desired function.
    To modify the manifest, you must first prepare a text file containing the information you wish to add to the manifest. You then use the Jar tool's m option to add the information in your file to the manifest.

    Warning:  The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.

    The basic command has this format:
    jar cfm jar-file manifest-addition input-file(s)