Java Network launching protocol (JNLP, Java Network loading protocol ).
What is JNLP? Java provides a way for you to directly execute Java applications through a browser, which enables you to directly open a Java application through a URL Connection on a web page. the benefit is worth noting. If your Java application is released in the form of JNLP, if you do not need to release a version to all users after the version upgrade, you only need to update the server version, this is equivalent to giving Java applications the advantages of Web applications.
How to Use JNLP:
1. Package Your application into an executable JAR file and put it in an accessible web directory, such as apptest. jar.
You can use the ant script, or you can use the jar tool to package it.
<Jar destfile = "$ {DESC. dir}/$ {youapp. jarname}" update = "true" compress = "true">
<Manifest>
<Attribute name = "Main-class" value = "" com. youapp. mainclass "/>
</Manifest>
<Fileset dir = "$ {class. dir}">
...
</Fileset>
</Jar>
2. Compile an XML file test. JNLP with the following content:
<? XML version = "1.0" encoding = "UTF-8"?>
<JNLP codebase = "http: // localhost/yousite/" name = "seatingchartbuilder"
Href = "http: // localhost/yousite/test. JNLP">
<Information>
<Title> seating chart builder </title>
<Vendor> etix.com, Inc. </vendor>
<Offline-allowed/>
<Description> An application to seating chart builder! </Description>
</Information>
<Application-Desc main-class = "com. youapp. mainclass"/> <! -- Here is the name of your app entry -->
<Security>
<All-permissions/>
</Security>
<Resources>
<J2se version = "1.4 +"/>
<Jar href = "apptest. Jar"/> <! -- Here is your packaged application -->
</Resources>
</JNLP>
3. You must sign your JAR File
Use keytool on the command line to generate a keystore file.
Keytool-genkey-keystore you. keystore-alias youapp
Use jarsigner to sign the command line. The keystore password must be generated at this time.
Jarsigner-keystore you. keystore apptest. Jar youapp
OK. Now, put the apptest. jar file in the/yousite directory of your web application.
Http: // localhost/yousite/test. JNLP can start your application,
At startup, a dialog box will pop up asking you to confirm the signature. Click Yes.
Here let's take a look at Sun's demo: http://java.sun.com/products/javawebstart/demos.html
Reference http://www.yeegle.com/articleview/33954.aspx
This article from csdn blog: http://blog.csdn.net/zmxj/archive/2005/02/22/297649.aspx