Java Web Start Overview
Java Web Start software provides a flexible and robust deployment solution for Java technology-based applications based on the Java Community Process program (JCP). The technology is being developed through the JCP program as JSR-56: The Java Network Launching Protocol & API (JNLP), which provides a browser-independent architecture for deploying Java 2 technology-based applications to the client desktop.
Java Web Start technology works with any browser and any Web server. Each application developed for use with the Java Web Start software specifies which version of the Java 2 platform it requires, e.g., version 1.4 or 1.5, and each application runs on a dedicated Java Virtual Machine (JVM).
Auto-download of Software from Java
A main feature of the Java Network Launching Protocol and API technology is the ability to automatically download and install Java Runtime Environments onto the users machine.
For example, an application might depend APIs in Sun’s Java Runtime Environment 1.4.0 (or later). When a user first accesses this application, the Java Web Start software will download all the needed files for the application, as well as download the Java Runtime Environment (JRE) if the requested version is not available locally. The ability to automatically download a JRE is one of the key features to ensure robust deployments. It ensures that the JRE that your application is tested on will be available on the user’s machine, as well as make it possible to seamlessly upgrade to improved versions of the Java 2 platform over time.
The auto-download feature simplifies Java Web Start deployments because it makes commonly used software readily available for use with Java Web Start. Typically, only an extra line has to be added to a JNLP file to take advantage of this feature. In contrast, without the auto-download feature, developers would be forced to repackage and host the software themselves — adding a significant overhead to the deployment burden. As an added benefit to both developers and end-users, this minimizes the download time for an application since each JRE will be shared between multiple applications.
The packages currently available for auto-download are:
- Java 2 Runtime Environment 1.3.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.3.1_08 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.3.1_09 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.3.1_11 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.3.1_18 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.0 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.1_02 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.1_07 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_01 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_04 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_12 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_13 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_09 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_14 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java 2 Runtime Environment 1.4.2_16 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_02 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_06 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_07 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_08 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_09 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_10 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_11 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.5.0_14 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.6.0 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.6.0_04 for Windows/i586, Linux/i586, and Solaris/SPARC
- Java Runtime Environment 1.6.0_05 for Windows/i586, Linux/i586, and Solaris/SPARC
Because the Java Web Start Java Runtime Environment installer uses Verisign certificates, the autodownload from here works only if the client machine has version 1.3 or later of the Java Runtime Environment installed.
How to Request a Specific Version of the Java Runtime Environment
The «j2se . » element is used to specify the set of Java Runtime Environments that your application supports. They can be specified both as a vendor-independent platform-version and as a vendor-dependent product version.
Specifying a platform version: Currently, there are three different platforms supported: 1.2, 1.3, 1.4, and 1.5. For example:
j2se version=»1.4 1.3+»
j2se version=»1.4″
The order in which the platforms are specified matters. In the above example, the application prefers the 1.4 platform, but can run on a 1.3 platform and above. Java Web Start will automatically do a request to the auto-download site and download a JRE matching this request if none are found locally.
Specifying a product version: A product version is specified by including a vendor-specific URL from where to download the JRE.
Example 1
j2se version=»1.4.2*» href=»http://goo.gl/oWqMb»
In the above example, a product version that has 1.4.2 as a prefix is requested, e.g., 1.4.2, 1.4.2_02, 1.4.2_04 would match.
Example 2
j2se version=»1.4.0_01+» href=»http://goo.gl/oWqMb»
In the above example, a product version that is equal to or greater than 1.4.0_01 is requested.
To request a particular version, you should specify a particular dot-dot release (e.g., 1.4.2* as shown above). Specifying a dot-dot-dot release (e.g., 1.4.2_02) is possible but not recommended — since it might force your customers to use an unsupported JRE. Specifying a dot-dot release assures that your customers always will download the latest supported release.
Lesson: Java Web Start
Java Web Start software provides the power to launch full-featured applications with a single click. Users can download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through lengthy installation procedures.
With Java Web Start software, users can launch a Java application by clicking a link in a web page. The link points to a Java Network Launch Protocol (JNLP) file, which instructs Java Web Start software to download, cache, and run the application.
Java Web Start software provides Java developers and users with many deployment advantages:
- With Java Web Start software, you can place a single Java application on a web server for deployment to a wide variety of platforms, including Windows, Linux, and Solaris.
- Java Web Start software supports multiple, simultaneous versions of the Java platform. An application can request a specific version of the Java Runtime Environment (JRE) software without conflicting with the needs of other applications.
- Users can create a desktop shortcut to launch a Java Web Start application outside a browser.
- Java Web Start software takes advantage of the inherent security of the Java platform. By default, applications have restricted access to local disk and network resources.
- Applications launched with Java Web Start software are cached locally for improved performance.
- Updates to a Java Web Start application are automatically downloaded when the application is run standalone from the user’s desktop.
Java Web Start software is installed as part of the JRE software. Users do not have to install Java Web Start software separately or perform additional tasks to use Java Web Start applications.
Additional References
This lesson is intended to get you started with Java Web Start technology and does not include all available documentation. For more information about Java Web Start technology, see the following: