Using Java Web Start to launch SimplyHTML

Java Web Start - a technology for simplifying deployment of Java applications - gives users the power to launch full-featured applications with a single click from a Web browser. Introduced in version 1.4 of the Java 2 Standard Edition (J2SE) Java Web Start allows to download and launch applications, such as SimplyHTML, without going through complicated installation procedures.

Benefits

The following benefits as listed in the Java Network Launching Protocol (JNLP) specification result from using Java Web Start:

How Java Web Start works for SimplyHTML

With stage 8 of SimplyHTML, the application home page at http://www.lightdev.com/dev/sh.htm holds a link to a .jnlp file which in turn specifies all details of application SimplyHTML (required files, descriptions, etc.). When the link is clicked, Java Web Start is invoked on the client and the application is loaded down to the client. Once loaded, SimplyHTML is launched and the application can be used immediately.

No manual installation, no copying of files, no command line scripting or desktop links, no compatibility checking, nothing.

Users can choose to always start SimplyHTML through the web or to download it to the client permanently and work with the application offline.

How it is done

To achieve a Java Web Start for SimplyHTML a .jnlp file is created as follows (with codebase below having an example entry)

<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+" codebase="http://www.lightdev.com/dev/">

<information>

<title>SimplyHTML</title>

<vendor>Light Development</vendor>

<homepage href="http://www.lightdev.com/dev/sh.htm" />

<description>SimplyHTML text processor for HTML and CSS</description>

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<resources>

<j2se version="1.4+" />

<jar href="SimplyHTML.jar"/>

<extension name="Java Help" href="javahelp.jnlp">

</extension>

</resources>

<application-desc main-class="com.lightdev.app.shtm.App" />

</jnlp>

A similar .jnlp file is created to deploy the JavaHelp runtime extension (file jhall.jar). The .jnlp files are copied onto the web server along with the signed application .jar file. Once the application home page has the mentioned link to the .jnlp file, it is ready to be 'Web Started'.

References

A very good article about how to 'Web Start' an application can be found at

http://developer.java.sun.com/developer/technicalArticles/Programming/jnlp/

A perfect explanation of how to obtain a certificate from a Certificate Authority and how to sign own code with such certificate can be found at

http://www.dallaway.com/acad/webstart/

The official Java Web Start product page is at

http://java.sun.com/products/javawebstart/