Skip to content

Deploy application with Java Network Launching Protocol (JNLP)

Which applications implements JNLP?

  • Java Web Start

What is Java Web Start?

  • What is Java Web Start?
  • Why should I use 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 1. Creating the JNLP file 1. 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

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).

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