Top
Interstage Studio J Business Kit User's Guide
FUJITSU Software

2.3.12 Switching the Property Files

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.

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.

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>

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.