Java Web Start

The Java Web Start API is an alternative to using applets. Java Web Start uses the Java Network Launching Protocol (JNLP) to transparently download and install Java applications locally. The only thing the user has to do is to click on the install link on a web page. The installed applications can then be launched just like any installed application, by clicking on an icon on the desktop or through the Start menu, but they continue to be managed by the Java security policy unless otherwise authorized by the user. Web Start applications also automatically check for upgrades and update themselves over the Net. Java Web Start is a form of zero administration client installation, which implies that the client doesn’t have to do any work to install or maintain the application. JNLP applications may be signed (allowing the user to grant them fine-grained privileges), or unsigned. But even unsigned JNLP applications can take advantage of standard APIs that prompt the user for permission to perform basic operations, such as opening files and printing.

Packaging your application to use JNLP is relatively easy, but we won’t get into it here. The process mainly involves creating a JNLP deployment file that lists your JARs and specifies any special permission they require. You must then include an appropriate link in your web page that uses Web Start. The first time a user tries to install a JNLP application, he will have to install the Java Plug-in. Thereafter, the Java Web Start component manages all JNLP installs. See Oracle’s website for more information.

Get Learning Java, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.