Creating the JNLP File (Java Web Start)
15 April 2008If 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"?> <jnlp spec="1.0" codebase="URL of application on your Web server" href="Notepad.jnlp"> <information> <title>Notepad Demo</title> <vendor>Sun Microsystems, Inc.</vendor> <offline-allowed/> </information> <resources> <jar href="Notepad.jar"/> <j2se version="1.3+"href="http://java.sun.com/products/autodl/j2se"/> </resources> <application-desc main-class="Notepad"/> </jnlp>
Once the file is ready, you have to place the application on the web server. Place all the JAR files and the
JNLP file on the web server. Make sure that the locations specified by the href attribute of the jar element in the JNLP file.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Creating the JNLP File (Java Web Start)