Jump to content

Java Network Launching Protocol

From Alfawiki
Adapted from the English Wikipedia article Java Network Launching Protocol, available under CC BY-SA 4.0Updated 9 August 2025
Java Web Start
Company typeSoftware framework
IndustryComputing / Software deployment
FoundedMarch 2001
FounderSun Microsystems
Defunct2018 (2018)
FateDiscontinued in Java SE 11; replaced by open source alternatives like IcedTea-Web and OpenWebStart
Area served
Worldwide
ProductsJava application deployment and launching technology
OwnerSun Microsystems (original), later Oracle Corporation
ParentOracle Corporation (after acquisition of Sun Microsystems)
Websitewww.oracle.com/java/technologies/javase/java-web-start.html

In computing, Java Web Start—also referred to as JavaWS, javaws, or JAWS—is a now-obsolete framework originally created by Sun Microsystems (currently Oracle). This technology allowed users to initiate application software for the Java Platform directly through the Internet using a web browser. It facilitated automatic version updates for applications distributed worldwide and offered improved management of memory allocation within the Java virtual machine.

Java Web Start was part of the Java Platform until its discontinuation in Java SE 11, having been deprecated starting with Java SE 9. Since Oracle did not contribute its source code to OpenJDK, native support was absent in OpenJDK distributions initially. The open source initiative IcedTea-Web, supported by the AdoptOpenJDK community, RedHat, and Karakun AG, provides an independent implementation that is included with certain OpenJDK builds. Moreover, OpenWebStart delivers an open source solution derived from IcedTea-Web, featuring additional capabilities and options for commercial support.

Functionality

Unlike Java applets, applications launched via Web Start operate outside the browser environment, typically within a sandbox akin to applets but extended to include user-approved file system access. Only applications that are digitally signed can request elevated permissions.

Java Web Start addresses compatibility challenges commonly encountered with browsers' Java plugins and differing versions of the JVM by executing applications independently from web pages. It is also capable of launching unmodified applets packaged in .jar archives using JNLP files, which can transmit parameters and run applets in separate windows; however, some specific loading scenarios may not be fully supported.

Similar to applets, Java Web Start maintains a cross-platform nature.

Deprecation

With the release of JDK9, Oracle marked several deployment technologies—including applets and Java Web Start—as deprecated.

In March 2018, Oracle announced that Java Web Start would be removed starting with Java SE 11 (18.9 LTS) and subsequent releases, encouraging developers to transition toward alternative deployment solutions. Since then, multiple independent alternatives have been developed.

Implementation

Application developers create a specialized XML document with a .jnlp extension specifying details such as application dependencies, code locations, runtime parameters, and permission requirements. When a browser downloads this file, it recognizes its MIME type (application/x-java-jnlp-file) and launches it using the Web Start utility. This utility then retrieves the necessary components and initiates the application.

Java Web Start provides classes within the javax.jnlp package that enable controlled access to system resources like files and clipboard contents while maintaining security by restricting operations within authorized boundaries.

Sun Microsystems introduced Web Start 1.0 in March 2001, adding support for 64-bit Windows platforms with Java 6. Since J2SE 1.4, Web Start has been bundled by default in the Java Runtime Environment (JRE) as javaws, streamlining deployment processes for system administrators.

Java Network Launching Protocol (JNLP)

The Java Network Launching Protocol (JNLP) establishes a method for initiating Java Web Start applications through an XML-based format. These JNLP documents define locations of jar files, main class identifiers, and application-specific parameters. When browsers are set up to handle JNLP, they forward these files to the Java Runtime Environment (JRE), which then downloads and executes the program on the local machine. Created under the Java Community Process as JSR 56, JNLP includes versions 1.0, subsequent maintenance releases such as 1.5, and forthcoming revisions.

Among its notable business advantages are the automatic installation of the JRE if it is missing, as well as the ability to specify the necessary JRE version for each application. Programs execute from a local cache, enabling offline usage while updates are downloaded in the background when connectivity is available—this approach simplifies software distribution and maintenance.

End users typically access JNLP applications by installing a client, most commonly Java Web Start, which can automatically install and launch applications during their initial use.

JNLP operates similarly to HTTP/HTML protocols: when a user clicks a link, the browser requests a URL from a web server that responds with a JNLP file instead of an HTML page. The client then processes this file, retrieves the designated jar resources, and initiates the application. Certain resources may be labeled "lazy," allowing their download to be deferred to enhance startup efficiency.

Example

Below is an example of a straightforward JNLP file designed to launch an applet. It specifies attributes such as codebase, source location, main class, and window dimensions. This file includes all necessary references for launching the application. Since no special permissions are requested, it runs within a sandbox environment. Additionally, the JNLP indicates that the application supports offline operation if cached locally and performs background updates.

<syntaxhighlight lang='xml'> <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="http://ultrastudio.org/upload" href="">

   <information>
       <title>Launch applet with Web Start</title>
       <vendor>Foo Bar Inc.</vendor>
       <offline-allowed/>
   </information>
   <resources>
       <j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
       <jar href="Ray-2.3-4ca60e46-0956-3f22-983c-e3ed986dfd03.jar" main="true" />
   </resources>
   <applet-desc name="Ray diagram applet" main-class="raydiagramsapplet.Main" width="300" height="200">
   </applet-desc>
 <update check="background"/>

</jnlp> </syntaxhighlight>

Pack200 compression

Introduced by Sun Microsystems in Java 1.5.0, Pack200 compression reduces the size of Java Web Start applications by compressing jar files to approximately one-ninth of their original size when containing solely Java classes.

Initially requiring configuration on the server side, Pack200 integration became transparent with Java SE 6 update 10, giving developers control to enable or disable this feature within JNLP descriptors. This compression technique enhances download speeds and startup performance, especially over slower network connections.

Signed Web Start applications

By default, Java Web Start programs operate under limited permissions that restrict access to system resources like local files. Application publishers can lift these constraints by digitally signing their applications using the jarsigner utility provided in the JDK.

Alternatives

The open-source IcedTea initiative provides an alternative JNLP solution named IcedTea-Web, which supports more recent Java versions that no longer include official Web Start capabilities.

After the discontinuation of official support in Java 11, Karakun AG introduced OpenWebStart, a derivative of IcedTea-Web. This version enhances the original by offering native installers for Mac OS, Windows, and Linux platforms. The development of IcedTea-Web was supported by contributions from RedHat and AdoptOpenJDK.

Notable applications

  • ArgoUML – application for creating UML diagrams.
  • CrossFTP – software serving as both FTP client and server.
  • Elluminate Live – platform for web conferencing and virtual classrooms.
  • Ganymede – network directory management system licensed under the GPL.
  • Genie Workbench – automation tools tailored for film production.
  • Genevestigator – engine providing access to bioinformatics databases.
  • Jake2 – Java adaptation of the Quake 2 game.
  • JOSM – editor for OpenStreetMap written in Java.
  • muCommander – file manager supporting SSH and FTP protocols.
  • PoxNora – turn-based strategy collectible card game with a 3/4 perspective.
  • Wurm Online – 3D massively multiplayer online fantasy simulation game.
  • yEd – software designed for creating graphs and diagrams.

See also

  • ClickOnce, Microsoft's comparable deployment technology for .NET applications.

External links