This section explains how to switch JBK Plugin property files used in JBK Plugin.
JBK Plugin usually runs based on the settings in the default property file jbkplugin.properties. To run JBK Plugin with different settings on the same client, prepare two or more property files and reference them selectively from the HTML file using JBK Plugin.
For example, the user can create two property files, each of which uses different JDK or JRE. Those property files can be used for each browser to execute applets on different versions of VMs.
To switch JBK Plugin property files, create the two kinds of files explained below.
Property files for switching
HTML File for Switching
Creating Selective Property Files
To run JBK Plugin with different settings, prepare individual property files for the particular settings. Use the default JBK Plugin property file (jbkplugin.properties) as template to prepare property for switching. Property files for switching must be stored in the same directory that the default property file (jbkplugin.properties) is stored in.
Name the selective JBK Plugin property files as jbkplugin.properties.xxx (the user can specify any string as 'xxx').
For the detail of the JBK Plugin property file, see "2.3 How to Use".
Example
Creating property files for switching
To switch between property files in order to use the Java VM with JavaSE 6 and JavaSE 7, you can name the property files by adding the JavaSE versions to them, as for example:
name the property file for Java VM with JavaSE 6 as "jbkplugin.properties.16," and
name the property file for Java VM with JavaSE 7 as "jbkplugin.properties.17,"
Naming in this way makes it easy to determine the content of a property file.
Only one type of property file can be used per process. Once a property file is read, the JBK Plugin runs based on that property file until the browser terminates.
The same value is used for the CLASSPATH environment variable in all property files. To use individual class paths for each property file, specify "-classpath" as a Java VM startup option in each property file instead of using the CLASSPATH environment variable. For information on specifying the Java VM startup option, see "2.3.2 Specifying Java VM Startup Options".
The same value is also used for the PATH environment variable in all property files. For example, if the applet is calling JNI, and the DLL to be loaded must be changed for each JDK/JRE version, store the respective DLL in the following directories for each JavaSE :
For JDK : <JDK-installed-directory>\jre\bin
For JRE : <JRE-installed-directory>\bin
Point
The user can specify any string as the suffix added to the selective property file name as long as the characters and the length of the string is acceptable for the file name.
The properties that can be defined in each property file for switching are similar to those that can be defined in the jbkplugin.properties default settings file.
Creating an HTML File for Switching
The method for defining an HTML file to select a property file is similar to that commonly used for running an applet, except that a new parameter must be added.
To use a particular property file for the applet, specify the property file in the new parameter of the applet.
Add a new parameter "@JBKPLGPROP" in the parameters passed to the applet (specified by the <PARAM> tag in <OBJECT>...</OBJECT>). As the parameter value, specify the suffix added to the name of the selective property file.
For the detail of creating the HTML file for running the applet, see "2.2.3 How to Create an HTML File for JBK Plugin".
Example
Example of creating an HTML file for Internet Explorer
If the name of the property file is jbkplugin.properties.14, specify the <OBJECT> tag for the applet as follows:
<OBJECT CLASSID="CLSID:BEA62964-C40B-11D1-AACA-00A0C9216A67" WIDTH=100 HEIGHT=100> <PARAM NAME="TYPE" VALUE="application/x-JBK-Plugin"> <PARAM NAME="@JBKPLGPROP" VALUE="14"> <PARAM NAME="NAME" VALUE="sample"> <PARAM NAME="CODE" VALUE="Sample.class"> </OBJECT> |
To include two or more applets in the same HTML file, specify the same property file with the @JBKPLGPROP parameter for all applets.
On the same browser, the user cannot use HTML files that use different property files. If the user want to use those HTML files at a time, launch another browser and use the HTML files separately on each browser.
Point
Both uppercase and lowercase characters can be specified in the parameter name @JBKPLGPROP.
If @JBKPLGPROP is omitted in the parameters, the default property file (jbkplugin.properties) is used.