Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer

Deploying Java Applets With Family JRE Versions in Java Plug-in for Internet Explorer

Titleimage

Posted by Ludovic Dessemon on 2015:08:21 14:24:36

Background

In releases prior to JRE 5.0 Update 6, you could specify exactly which JRE release to deploy with a Java applet.

As of JRE 5.0 Update 6, you can no longer specify the exact JRE release due to the potential misuse of static versioning. Instead, all Java applets are run using the latest version of the JRE software that is installed on the system. Note that this new behavior will not change if, after installing JRE 5.0 Update 6 or a later release, you then install an earlier JRE release. For details, see Java Plug-in and Java Web Start May Allow Applets and Applications to Run With Unpatched JRE [ID 1000671.1] on My Oracle Support.

Because you can only use the latest version of the JRE software that is installed on the system to run Java applets, you must migrate your software to the latest JRE version as soon as possible.

This change might break existing Java applets that cannot be immediately migrated to the latest JRE version. For this reason, the JRE 5.0 Update 7 release introduces an interim solution that enables these Java applets to run with a specific JRE family version. As such, you can keep your existing deployment working while migrating your Java applets to the latest JRE version. This interim solution is described in the next section.

Developers and Independent Software Vendors (ISVs) who want a longer term solution of deploying Java APPLICATIONS through a browser to a specific JRE release might want to use Java Web Start. For information about Java Web Start, see Java Web Start Technology.

 

Specifying Family JRE Versions for Java Applets

In the JRE 5.0 Update 7 release for Java Plug-in for Internet Explorer, two new family Class IDentifier (CLSID) fortags are introduced. You can use these tags to specify that the Java applet requires the JRE 1.4.2 or the JRE 5.0 family to run. In the JRE 6 release for Java Plug-in for Internet Explorer, a third new family CLSID is introduced so that you can specify that the Java applet requires the JRE 1.4.2, JRE 5.0, or JRE 6 family to run. In all releases, you cannot specify a specific release within a JRE family.

The following shows the family CLSID to specify for each JRE family version.

JRE Family Version 1.3.1 Note that the 1.3.1 family clsid is not currently available. It will be available in forthcoming JRE 6 and JRE 5.0 update releases.

 

Family CLSID: clsid:CAFEEFAC-0013-0001-FFFF-ABCDEFFEDCBA

 

JRE Family Version 1.4.2
Family CLSID: clsid:CAFEEFAC-0014-0002-FFFF-ABCDEFFEDCBA

JRE Family Version 5.0
Family CLSID: clsid:CAFEEFAC-0015-0000-FFFF-ABCDEFFEDCBA

JRE Family Version 6.0
Family CLSID: clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA

JRE Family Version 7.0
Family CLSID: clsid:CAFEEFAC-0017-0000-FFFF-ABCDEFFEDCBA

When a JRE family is specified, the Java Plug-in software looks for the latest release of that family that is currently installed. The Java Plug-in software prefers a release that is equal to or later than theSECURITY baseline for that JRE family.

The security baseline consists of the version number of the latest release for each JRE family that is available when the latest JRE family is built. For example, when the JRE 5.0 Update 7 release was built, the security baseline for the 5.0 JRE family was 5.0 Update 7. For the 1.4.2 JRE family, the security baseline was 1.4.2_10. Starting with the JRE 5.0 Update 7 release, the security baseline information is included in each release of the most current JRE family.

Suppose the following applet that uses the 1.4.2 family CLSID is launched:

<OBJECT
     classid="clsid:CAFEEFAC-0014-0002-FFFF-ABCDEFFEDCBA"
     width="200" height="200">
     <PARAM name="code" value="Applet1.class">
</OBJECT>

If one or more versions of the JRE 1.4.2 release are installed and the latest version is no older than the security baseline, the Java Plug-in software runs the applet using that release.

If one or more versions of the JRE 1.4.2 release are installed and the latest version is older than the security baseline, the Java Plug-in software displays a warning.

The user must click Yes to run the applet. The user also has theOPTION of downloading the latest release.

If the JRE 1.4.2 release is not installed, the Java Plug-in softwareOFFERS to download its most recent version.

Similar actions are taken for a CLSID that specifies the JRE 5.0 family when a later JRE family is released. In this case, where JRE 5.0 is the latest family JRE, the firstACTION is taken. In some cases, you might want to detect if the family CLSID is available and then generate the tag dynamically. Such detection can be done by checking the "JavaPlugin.FamilyVersionSupport" ProgID in JavaScript, as follows:

<SCRIPT language="JavaScript">

    // Return true if the family version is supported.
    function isFamilyVersionSupported() {
        try {
            return (new ActiveXObject("JavaPlugin.FamilyVersionSupport") != );
        } catch (exception) {
            return false;
        }
    }

    if (isFamilyVersionSupported()) 
        // Family CLSID is supported
        document.writeln("<OBJECT classid=\"clsid:{CAFEEFAC-0014-0002-FFFF-ABCDEFFEDCBA}\" ..... </OBJECT>");
    else  
        // No family CLSID supported, continue to use specific version
        document.writeln("<OBJECT classid=\"clsid:{CAFEEFAC-0014-0002-0008-ABCDEFFEDCBA}\" ..... </OBJECT>");
</SCRIPT>

 

Oracle Support Policy

The family CLSID feature is an interim solution supported by Oracle for customers who have Java applets in transition. This solution enables customers to continue their existing deployment with the latest version of JRE in a specific family before the Java applets can fully be migrated to the latest JRE version in the latest family. Oracle will not withdraw support for the family CLSID feature without introducing new functionalityADDRESSING these customer needs. The family CLSID feature in the Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) release supports JRE family versions 5.0 and 1.4.2. The family CLSID feature in the Java SE 6 release supports JRE family versions 6, 5.0, and 1.4.2. The famliy CLSID feature in the Java SE 7 release supports JRE family versions 7, 6, 5.0, and 1.4.2. If you have deployment scenarios that cannot be satisfied by using the family CLSID feature, or you have an older product family, contact Oracle for further assistance.

More Information

For more information, refer to JavaTM SE 6: New Deployment Policies for Java SE Customers .

Note

If a more recent JRE 7 update becomes available and the requirement is to force users to upgrade to that version then replace 71 in the jpi_classid parameter with the desired update.  For example, if JRE 7 update 72 is the desired version then perform step 2 from above and also change jpi_classid in the formsweb.cfg as follows :

FROM : jpi_classid=clsid:CAFEEFAC-0017-0000-0071-ABCDEFFEDCBA
TO     : jpi_classid=clsid:CAFEEFAC-0017-0000-0072-ABCDEFFEDCBA

Once the above steps are followed then users will be forced to use JRE 7 Update 72 as a minimum.

Posted by Ludovic Dessemon on 2015:08:21 14:24:36

Return to Blog