Added by Erik Drolshammer, last edited by Erik Drolshammer on Mar 10, 2009  (view change)

Labels:

deployment deployment Delete
strategy strategy Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Which applications implements JNLP?

  • Java Web Start

What is Java Web Start?

  • Advantages you can get by using Java Web Start to distribute applications.
    • Easy installation. Users can install a new application by simply clicking a link on a web page.
    • Platform independence. With Java Web Start, you can place a single Java application on a web server for
      deployment to a wide variety of platforms, including Windows 98/NT/2000/ME/XP, Linux, and Solaris .
    • Java Runtime Environment management. Java Web Start supports multiple, simultaneous versions of the Java 2
      Standard Edition platform. Specific applications can request specific Java versions without conflicting with the
      different needs of other applications. Java Web Start automatically downloads and installs the correct version
      of the Java platform, as necessary, based on the application's needs and the user's environment.
    • Desktop integration. Users can access any Java Web Start application, including those that rely on the network,
      just as they can any native application, right from their familiar desktops.
    • Application updates. You can update an application for all users simply by providing an updated JAR file on
      the Web server. On each user's computer, Java Web Start checks the Web server for updates when the
      application runs.
    • Familiar Java development requirements. You develop applications you intend to deploy with Java Web Start
      just as you would any Java application, with a few familiar packaging requirements. Updating a legacy
      application to be deployed through Java Web Start is, in most cases, a simple process.
    • Security. Java Web Start takes advantage of the inherent security of the Java platform. Application users can
      be confident that a Java Web Start application is restricted to a sandbox and cannot corrupt their systems.
      If you have provided for additional functionality and signed the application's JAR files, users decide if they
      trust the application's source and, if so, allow it to run. Nothing can happen behind the scenes without the
      user's awareness and approval.
    • Performance. Applications launched with Java Web Start are cached locally, for improved performance.

From white paper , page 13.

How to use

Deploying a Java Web Start Application involves the following steps:

  1. Setting up the web server
  2. Creating the JNLP file
  3. Placing the application on a web server

This can be achieved with two different approaches:

  • Statically generate jnlp files
  • Dynamically generate jnlp files
    • Requires a servlet container (e.g. jetty, tomcat)
    • The url to the jnlp files on the webserver can be dynamically defined, because the jnlp files are generated on the server.
    • More flexible than the static approach, because the servlet can be used to implement a configuration scheme and simplify changing properties.
    • See Maven Webstart - JNLP DownloadServlet
Full Size
A Gliffy Diagram named: Webstart

Resources

JNLP implementations

See (a bit outdated comparison) comparison

OpenJNLP - open-source implementation of the JNLP protocol
Netx is a high-quality implementation of the Java Network Launching Protocol (JNLP).

Similar or related products

Rachel is an open-source resource loading toolkit for Java Web Start/JNLP.
JNLP Wrapper
Apollo - Open Source Test Skeleton Toolkit for Java Web Start
JDIC Packager is a tool for putting JNLP applications into installable packages of the standard Windows, Linux, and Solaris formats — MSI, RPM and PKG, respectively.

Java Web Start docs from SUN

Other Java Web Start docs

Technology: Deploy application with Java Network Launching Protocol (JNLP) with JNLPDownloadServlet

  • javaws http://webstart.company.com/latestrelease for deployment (single step)
  • Download only changes (downloads can be lazy or eager)
  • Possible to choose between different versions by using a different url when running javaws.
  • Will always get the correct version of the application
    • Problems (e.g. timeouts) might result in webstart starting up the old version.
  • Support for jvm startup parameters
    • set in template files used by the webstart-webapp, but it might be possible to use the servlet to let a user input these parameters or load them from an external source
  • DownloadServlet enables JNLP files to be written and deployed without containing hard-coded URLs.
  • The url to the configService must be passed to the jnlp-client so the application can look-up its configuration.
    • It seems it is possible to set system properties . This will allow setting urlToConcreteConfig, which the application thus can download during startup.
    • Resources that need to be pushed from the webstart-server need to be packaged as jar-files (I think images can be sent as well, but property-files is not possible AFAIK.)
  • It is possible to set up webtart such that the application can be started without any manual steps first. Configuration can be done using
    • lookup against a configurationService/JNDI (complex, but more flexible because it is possible to ensure that two applications always has the same value for a given property) or
    • against filsesystem to a specific folder (simple, but hard to share properties across applications)
TODO
  • How do webstart relate to service scripts?
    • Have an application that you'd like to run as a service, but have it and the
      VM auto-update? Want to guarantee it will always be running (even through VM
      or Web Start crashes)? Want it manageable from the OS, and log to an OS
      appropriate mechanism? Want to keep it cross platform?
    • We used the Java Service Wrapper (http://wrapper.tanukisoftware.org/doc/english/index.html) and Java Web
      Start (http://java.sun.com/products/javawebstart/) to create a service that can meet all of these demands.
  • How do webstart releate to service monitoring

Resources: Solaris SMF , Java service wrapper

Posted by Erik Drolshammer at Jul 30, 2008 14:31 Updated by Thor Henning Hetland
All content on this wiki is licensed under a Creative Commons Attribution 3.0 Unported License.