This document outlines the applet installation enhancements that has been planned in Java Plug-in for Ladybird/Merlin release. The main goal of this enhancement is to make applet much easier to be used in both the desktop and browser environment.
Currently, we provide applet installation support in Java Plug-in for Kestrel. The idea is to store applet JAR files locally into permanent store, so applet will be downloaded only when it is necessary. However, to launch the applet, users will still need to bring up the browser and type-in the URL to start the applet. Also, although applet may be cached completely in the local disk, it still requires the user to connect to the network to download the HTML page to launch the applet. This eliminates any type of applet usage in an offline situation, such as laptop users.
Several HTML parameters will be introduced into Java Plug-in to support this enhancement:
Parameter Name | Parameter Value |
applet_html_title | Applet's HTML page title |
applet_html_version | Applet's HTML page version |
applet_object_clsid | CLSID to be used with the applet in OBJECT tag |
applet_object_codebase | CAB codebase to be used with the applet in OBJECT tag |
applet_embed_pluginpage | Pluginpage to be used with the applet in EMBED tag |
applet_embed_pluginsurl | Pluginsurl to be used with the applet in EMBED tag |
For example, you may specify your applet as follows:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 300 HEIGHT = 300 codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"> <PARAM NAME=code VALUE="XYZApp"> <PARAM NAME=type VALUE="application/x-java-applet;version=1.2.2"> <PARAM NAME=model VALUE="models/HyaluronicAcid.xyz"> <COMMENT> <EMBED type="application/x-java-applet;version=1.2.2" code="XYZApp" width=300 height=300 model="models/HyaluronicAcid.xyz" pluginspage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html"> </COMMENT> </OBJECT>
To enable HTML caching, you should modify the HTML tags as follows:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 300 HEIGHT = 300 codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"> <PARAM NAME=code VALUE="XYZApp"> <PARAM NAME=type VALUE="application/x-java-applet;version=1.2.2"> <PARAM NAME=model VALUE="models/HyaluronicAcid.xyz"> <PARAM NAME=applet_html_title VALUE="Molecule Viewer Applet"> <PARAM NAME=applet_html_version VALUE="1.0.0.0"> <PARAM NAME=applet_object_clsid VALUE="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"> <PARAM NAME=applet_object_codebase VALUE="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"> <PARAM NAME=applet_embed_pluginpage VALUE="http://java.sun.com/products/plugin/1.2.2/plugin-install.html"> <COMMENT> <EMBED type="application/x-java-applet;version=1.2.2" code="XYZApp" width=300 height=300 model="models/HyaluronicAcid.xyz" pluginspage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html" applet_html_title="Molecule Viewer Applet" applet_html_version="1.0.0.0" applet_object_clsid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" applet_object_codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0" applet_embed_pluginpage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html"> </COMMENT> </OBJECT>
When Java Plug-in encounters this HTML page with the special PARAMs, it will generate an HTML file locally as follows:
<HTML> <TITLE>Molecule Viewer Applet</TITLE> <BODY> <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 300 HEIGHT = 300 codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"> <PARAM NAME=code VALUE="XYZApp"> <PARAM NAME=type VALUE="application/x-java-applet;version=1.2.2"> <PARAM NAME=model VALUE="models/HyaluronicAcid.xyz"> <PARAM NAME=applet_html_title VALUE="Molecule Viewer Applet"> <PARAM NAME=applet_html_version VALUE="1.0.0.0"> <PARAM NAME=applet_object_clsid VALUE="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"> <PARAM NAME=applet_object_codebase VALUE="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0"> <PARAM NAME=applet_embed_pluginpage VALUE="http://java.sun.com/products/plugin/1.2.2/plugin-install.html"> <COMMENT> <EMBED type="application/x-java-applet;version=1.2.2" code="XYZApp" width=300 height=300 model="models/HyaluronicAcid.xyz" pluginspage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html" applet_html_title="Molecule Viewer Applet" applet_html_version="1.0.0.0" applet_object_clsid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" applet_object_codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0" applet_embed_pluginpage="http://java.sun.com/products/plugin/1.2.2/plugin-install.html"> </COMMENT> </OBJECT> </BODY> </HTML>
The generated HTML page will contain information about the installed applet itself. However, any other HTML elements (e.g. JavaScript) in the original HTML page will not be stored in the generated HTML page. Each applet on the same HTML page taking advantages of this enhancement will result in separated generated HTML page for each applet.
The generated HTML page will be
stored as in the following path:
<user.home>/java_applet_Store/<plugin
version>/html//<applet_html_title>/index.html
This should provide enough namespaces to avoid multi-versioning problem.
Versioning information about the generated HTML page will be stored in a version table file:
<user.home>/java_applet_Store/<plugin version>/html/version.table
Even if the HTML page are generated for the applet and stored locally, launching the applet will still not be easy because of the location the page is stored. To make it easier for users to launch the applet, the following will be provided:
Before the shortcut/bookmark is
created, Java Plug-in will prompt the users to ensure that the shortcut/bookmark
will be added only if the users agree to.
Error handling will be provided using the unified dialog support in the new Applet Usability framework in Java Plug-in for Merlin, so exception dialog may popup when an error occurs. The following situations will cause the exception dialog to popup:
By enabling -Djavaplugin.trace=true in the Java Plug-in
Control Panel, progress statu about HTML installation will be displayed in the
Java Console, so users will be able to determine what's happening under the
cover easily.
The above outlines all the applet installation enhancements that are planned in Java Plug-in for Merlin release. Hopefully, this will make applets much easier to be used by users and developers.
Date | Action | Author(s) |
04/20/2000 | Applet Installation Enhancement Draft 1 | Stanley Ho |
07/06/2000 | Added section Deleting Cached HTML Files | Devananda J. |
07/18/2000 | Updated the storage path for generated HTML files to use the plugin version | Devananda J. |
07/31/2000 | Added "Error Handling" section | Stanley Ho |