United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6727949 disabling <applet> tag support should not affect applets using <object> tag
JDK-6727949 : disabling tag support should not affect applets using tag

Details
Type:
Bug
Submit Date:
2008-07-21
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-10-01
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b31)

Related Reports

Sub Tasks

Description
This problem has been reported in the java.net plugin's forum:
http://forums.java.net/jive/thread.jspa?threadID=44150&tstart=0

To reproduce the problem:
- install JRE 6u10 - the next-generation Java Plug-in is the default
- open the Internet Explorer's Internet Options "Advanced" panel
- uncheck the following checkbox
        Use JRE 1.6.0_10 for <applet> (requires restart)
- run an applet with an <object> tag, such as
      http://java.sun.com/products/plugin/1.5.0/demos/plugin/applets/ArcTest/example1.html

The applet won't load.
However, the above steps works with the classic Java Plug-in.

                                    

Comments
SUGGESTED FIX

------- DllServer.cpp -------
*** //C/tmp/sccs.001000 Mon Jul 21 18:21:25 2008
--- DllServer.cpp       Mon Jul 21 18:17:15 2008
***************
*** 476,488 ****
      // before returning to the caller.

      HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
      if (FAILED(IsJavaPluginDefaultVM())) {
!         hr = LoadMSJavaVM(riid, ppvObjOut);
      } else {
!         hr =  _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
!         if (SUCCEEDED(hr)) {
!               CAxControl::SetVersionString(rclsid);
!         }
      }

      return hr;
--- 476,503 ----
      // before returning to the caller.

      HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
      if (FAILED(IsJavaPluginDefaultVM())) {
!
!       if (IsEqualCLSID(rclsid, CLSID_JavaPlugin) ||
!           IsEqualCLSID(rclsid, CLSID_NEW_DYNAMIC) ||
!           ((rclsid.Data1 == 0xCAFEEFAC) && (rclsid.Data4[7] != 0xBB)) ) {
!           hr =  _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
!           if (SUCCEEDED(hr)) {
!                   CAxControl::SetVersionString(rclsid);
!           }
!       } else {
!           hr = LoadMSJavaVM(riid, ppvObjOut);
!       }
      } else {
!       hr =  _Module.GetClassObject(CLSID_JavaPlugin, riid, ppvObjOut);
!       if (SUCCEEDED(hr)) {
!               CAxControl::SetVersionString(rclsid);
!       }
      }

      return hr;
                                     
2008-07-22
EVALUATION

When disabling the <applet> tag support through the IE's Internet Properties "Advanced" tab, we're basically setting the following registry key to 0

    HKLM\\Software\\JavaSoft\\Java Plug-in\\UseJava2IExplorer

In the entry point of the jp2iexp.dll (DllGetClassObject), we currently are checking if the above registry key isn't set, we'll try to invoke MSVM without taking into account whether there's an incoming clsid as in the case when an applet is using the <object> tag. A potential fix is in additional to checking the above registry key, we should also take into account the incoming clsid before inovking MSVM. Care should be taken not to honor the redirected clsid from the <applet> tag - the static versioning clsid ending with 0xBB.
                                     
2008-07-22



Hardware and Software, Engineered to Work Together