Applet Developer's Guide
These documentation pages are no longer current. They remain available for archival purposes. Please visithttps://docs.oracle.com/javase for the most up-to-date documentation.
RichInternet Applications Development and Deployment > AppletDeveloper's Guide
Java™ Plug-in technology (hereafter the "Java Plug-in"),which is included in the Java Runtime Environment, enables Javaapplets to run in popular web browsers on the desktop. Thenext-generation Java Plug-in, new in Java SE 6 update 10 release,provides powerful new capabilities to applets in the web browser,while improving the overall reliability and functionality ofapplets in a backward-compatible manner.
The next-generation Java Plug-in offers a completely redesignedarchitecture. Instead of executing applets in the same operatingsystem process as the web browser, the new plug-in runs one or moreJava virtual machine instances ("JVMs") which connect back to thebrowser for full interoperability with the surrounding web page.This architectural change offers many advantages and enablesseveral new features.
- Improved reliability. The JVM running the applet isisolated from the web browser at the operating system level. Ifsomething should go wrong while running the applet, or if anuncooperative applet refuses to shut down, the new Java Plug-indetects and handles the error condition gracefully; the web browseris unaffected.
- Built-in JNLP support. The new Java Plug-in offers thecapability to launch applets directly from JNLP files, unifyingdeployment of Java content both in the browser and out of thebrowser (via Java Web Start). Developers can now reuse JNLPextensions for advanced functionality including theJavaFX run-time libraries,3D graphics via OpenGL, andplanetary-scaleterrain visualization within applets. Applets can now accessJNLP APIs for persistent data storage, local file system access,and other useful functionality from sandboxed code.
- Improved user experience. The new Java Plug-in startsapplets in the background, so the web browser always remainsresponsive. Applets appear on the web page as they become ready torun.
- Improved Java/JavaScript communication. The bridgebetween the JavaScript engine in the web browser and the Javaprogramming language has been completely reimplemented. The newimplementation is backward-compatible and features improvedreliability, performance and cross-browser portability, for bothJava calling JavaScript as well as JavaScript calling Java.Formerly Mozilla-specific "LiveConnect" functionality, such as theability to call static Java methods, instantiate new Java objectsand reference third-party packages from JavaScript, is nowavailable in all browsers.
- Improved applet lifecycle management. Calls to theapplet lifecycle methods
init,start,stop, anddestroy are more deterministicand cross-browser behavior has been improved. The applet classloader cache and the legacy applet lifecycle, required for backwardcompatibility, are fully supported and the behavior of both hasbeen improved. - Better large heap support. Historically, the maximumheap size that could be specified for applets via the Java ControlPanel has been limited. This limitation is fixed in the new JavaPlug-in; applets can now utilize as much heap space as command-lineapplications.
- Better Windows Vista support. Signed applets running inProtected Mode Internet Explorer on Microsoft's Windows Vista nowhave the same privileges as normal user applications, eliminating aportability barrier to this platform.
- Per-applet command-line arguments. JVM command-linearguments may be specified in the HTML of the web page on aper-applet basis, providing fine-grained control over options suchas the heap size and Java 2D hardware acceleration features.
- Multiple JRE version support. Each individual appletinstance may request a different JRE version on which to run. Thisfeature is designed for enterprise customers which prefer toqualify their applets against either a particular JRE version or aparticular JRE family. Both selection of a specific JRE version, orany in a particular family, are supported in the new JavaPlug-in.
The following topics provide more information about developingand deploying applets that leverage the next-generation JavaPlug-in.
The following topics provide information about the nextgeneration Java Plug-in.
The following topics provide information about the old JavaPlug-in available before the Java SE 6 update 10 release.