Documentation Contents

Rich Internet Applications Decision Guide

Java Rich Internet Applications Guide > Rich Internet Applications Decision Guide

Applet or Java Web Start Application?

Both applets and Java Web Start applications are rich internet applications (RIAs). RIAs are easier to distribute than standard applications, because they're launched over the web. They both require permission from the user to run, so it is important that they be signed with a valid certificate from a trusted authority to enable the user to make an informed decision about running the application. RIAs can only access the user's system in highly controlled ways, unless extended access is requested when launched and permitted by user.

Here's a table that summarizes the differences:

Feature Applet Java Web Start
Java version

Individual applets may specify the exact version, or version range, of the Java platform it will use. The Java Plug-in supports both static version requests (such as "5.0 update 9") and family version requests (such as "5.0 family"), and supports several backward compatibility mechanisms such as static and family ClassIDs in Internet Explorer. See JRE Version Selection in Applet Deployment for details.

Java Web Start will also be used only from the latest Java version installed on a system, but the version of Java Web Start run is independent of the version of the Java platform used. A Java Web Start application can specify the exact version, or version range, of the Java platform that it will use.

Cookies

Java Plug-in applets run in the same session as the browser, and so have access to both "persistent" cookies and "session" cookies already stored in the browser session.

Java Web Start runs outside the browser process. It can access "persistent" cookies stored by the browser (it does this by using the WinINet API on Windows), but has no access to "session" cookies unless set in that application using the java.net.CookieManager and java.net.CookieHandler API's.

Browser Interactions

Java Plug-in includes the ability for applets to interact with the current browser session with the the Common DOM API. See Manipulating DOM of Applet's Web Page from the Java Tutorials. In addition, Java applets can invoke JavaScript functions present in the same web page as the applet and JavaScript code on a web page can interact with Java applets embedded on the page. See Invoking JavaScript Code From an Applet and Invoking Applet Methods From JavaScript Code from the Java Tutorials.

Java Web Start is limited to invoking the default browser to display specific URL's (see JNLP API).

Java Runtime

An applet may specify Java Runtime parameters used to launch that particular applet instance, without affecting the parameters used to launch other applets. Specifying Java Runtime parameters via the Java Control Panel is also supported for backward compatibility purposes.

Java Web Start applications have (limited) control over the Java Runtime parameters that is used to launch that application.

JNLP API

Applets launched using Java Network Launching Protocol (JNLP) have access to JNLP API which allows sandbox applications access to persistent storage, download control, file I/O, and more.

Java Web Start includes access to the JNLP API,

Shortcuts

You can develop draggable applets. A Java applet that is deployed by specifying the draggable parameter can be dragged outside the browser and dynamically transformed into a Java Web Start application. The Java applet can be dragged by pressing the Alt key and the left mouse button and dragging the mouse. You can add a desktop shortcut that can be used to launch your application outside the browser. See Developing Draggable Applets in the Java Tutorials for more information.

Java Web Start applications can install shortcuts that allow the application to be rerun, either online or offline, independent of the browser.

Other differences

There are several other minor differences caused by need to maintain compatibility with earlier versions. For further information on the specific differences between Java Web Start and Java Plug-in can be found in Migrating Java Applets to Java Web Start Applications.




Oracle and/or its affiliates Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.
Contact Us