HOW TO

Force the ArcIMS Java Viewer Applet to run using a specific version of the Java Plug-In

Last Published: April 25, 2020

Summary

The ArcIMS Java Viewer requires the installation of the Java Runtime Environment (JRE) application. By default, the Java Viewer uses the default version of JRE installed on the client machine. If a client machine does not have JRE installed when accessing the Java Viewer for the first time, the JRE is downloaded to the client, prior to loading the Java Viewer applet.

Some versions of JRE do not work properly with the ArcIMS Java Viewer. With Java Plug-In 1.3.1.* or higher, it is possible to force the Java Viewer applet (or any Java applet) to download and use a specific version of JRE, even though there are other versions of JRE already installed on the client. This is referred to as Static Versioning.

The instructions provided in this article explain the steps to automatically install a supported version of the Java Plug-In on the client machine and force the Java Viewer Applet to use the always use this version.

Note that the supported versions of JRE for the ArcIMS 9.0 Java Viewer are versions 1.4.0 and 1.4.1_02.

Procedure



  1. Download the supported version of JRE executable from the following Sun's Web site:
    http://java.sun.com/products/archive/index.html

    Note:
    Be sure to download Java 2 RunTime Environment and not Java 2 SDK. Also make sure you download international version of Java 2 RunTime Environment.

  2. Copy the executable file downloaded in step 1 to <drive>:/ArcIMS/Website/Install folder.
  3. Open <drive>:/ArcIMS/Website/<Website_Name>/ie.htm file in a Text Editor and change the code as described below:

    Code:

    var codebase;
    codebase = new String(array[0] + "//" + array[2] + "/website/install/j2re-1_4_2-windows-i586-iftw.exe#Version=1,4,2");
    //alert(codebase);
    document.write('<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="1" height="1" codebase="' + codebase + ' ID="imsSite">' + '\n');
    document.write ('<param name="code" value="AIMSInstall">' + '\n');

    --to--

    Code:

    var codebase;
    codebase = new String(array[0] + "//" + array[2] + "/website/install/j2re-1_4_0-win-i.exe");
    //alert(codebase);
    document.write('<object classid="clsid:CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA" width="1" height="1" codebase="' + codebase + ' ID="imsSite">' + '\n');
    document.write ('<param name="code" value="AIMSInstall">' + '\n');


    Referring to the code above, please note the following:

    A. The code is applicable to JRE version 1.4.0. If a different version is used, change the codebase variable and classid attribute accordingly. For example, with JRE version 1.4.1_01, the values are:
    var codebase;
    codebase = new String(array[0] + "//" + array[2] + "/website/install/j2re-1_4_1_01-win-i.exe");
    classid="clsid:CAFEEFAC-0014-0001-0001-ABCDEFFEDCBA".

    See Related Information below for more information on ways to define the classid for a given version of JRE.

    B. The fixed id clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 refers to dynamic versioning. That means if the same or new versions do not exist, the java plug-in defined in the codebase will be downloaded. Otherwise the latest version loaded on the client is used.
    The unique id clsid:CAFEEFAC-0013-0001-0000-ABCDEFFEDCBA refers to static versioning. That means that if the client has newer versions of the JRE installed, the java plug-in specified in the codebase will be installed. If the specified version exists, it will always be used; if it doesn't, it will be downloaded.
    In general the CLSID is defined as follows:
    CAFEEFAC-<major version>-<minor version>-<patch version>-ABCDEFFEDCBA
    See Related Information below for more information.
  4. Look for the following line in ie.htm and change it as follows:

    Code:
    <EMBED TYPE="application/x-java-applet;version=1.3" WIDTH="1" HEIGHT="1"
    INSTALL_TYPE="CLIENT"
    CODE="AIMSInstall"
    pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">

    --to--

    Code:

    <EMBED TYPE="application/x-java-applet;jpi-version=1.4" WIDTH="1" HEIGHT="1"
    INSTALL_TYPE="CLIENT"
    CODE="AIMSInstall"
    pluginspage="http://<webserver>.<domain>.com/website/install/j2re-1_4_0-win-i.exe">

  5. Open <drive>:ArcIMS/Website/<Website_Name>/map.htm file in a Text Editor and change the following line:

    Code:
    document.writeln('<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width=100% height=100%
    codebase="../install/install.htm" ID="IMSMap">');

    --to--

    Code:

    document.writeln('<object classid="clsid:CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA"
    width=100% height=100%
    codebase="../install/install.htm" ID="IMSMap">');


    Note:
    The "classid" defined above is for JRE version 1.4.0. See step 3 above to determine the correct value for classid if you are using a different version of JRE.

  6. Look for this line in map.htm and change it as follows:

    Code:
    document.writeln('<embed type="application/x-java-applet;version=1.3"
    width="600" height="480"
    code="com/esri/ae/applet/IMSMap" name="IMSMap"
    pluginspage="../install/install.htm">');

    --to--

    Code:

    document.writeln('<embed type="application/x-java-applet;jpi-version=1.4"
    width="600" height="480"
    code="com/esri/ae/applet/IMSMap" name="IMSMap"
    pluginspage="../install/install.htm">');

Article ID:000005743

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic