Creating the JNLP File (Java Web Start)
by, 11-28-2011 at 07:08 PM (1749 Views)
If you plan to run an application with Java Web Start, you have to create JNLP (Java Network Launching Protocol) file. In this post, I will briefly explain how to do that.
The JNLP file is an XML file and it contains elements and attributes that tell Java Web Start how to run the application.
Presented below is a JNLP file for the Notepad application:
<!--?xml version="1.0" encoding="utf-8"?-->
Once the file is ready, you have to place the application on the web server. Place all the JAR files and theJava Code:<jnlp spec="1.0">codebase="URL of application on your Web server" href="Notepad.jnlp"> <information> <vendor>Sun Microsystems, Inc.</vendor> <offline-allowed> </offline-allowed></information> <resources> <jar> <j2se version="1.3+"> </j2se></jar></resources> <application-desc main-class="Notepad"> </application-desc></jnlp>
JNLP file on the web server. Make sure that the locations specified by the href attribute of the jar element in the JNLP file.