Java Web Start

Problem

You have an application (not an applet) and need to distribute it electronically.

Solution

Sun’s Java Web Start combines browser-based ease of use with applet-like " sandbox” security (which can be overridden on a per-application basis) and “instant update” downloading, but also lets you run a full-blown application on the user’s desktop.

Discussion

Java Web Start (JWS[55]) is a new technology for providing application downloads over the Web. It is distinct from applets (see Chapter 17), which require special methods and run in a browser framework. JWS lets you run ordinary GUI-based applications. It is aimed at people who want the convenience of browser access combined with full application capabilities. The user experience is as follows. You see a link to an application you’d like to launch. If you’ve previously installed JWS (explained toward the end of this recipe), you can just click on its Launch link and be running the application in minutes. Figure 23-6 shows the startup screen that appears after clicking a Launch link for my JabaDex application.

Starting JabaDex as a JWS application

Figure 23-6. Starting JabaDex as a JWS application

After the application is downloaded successfully, it will start running. This is shown in slightly compressed form in Figure 23-7.

JabaDex up and running

Figure 23-7. JabaDex up and running ...

Get Java Cookbook 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.