JDK-6589638 : Converted applet fails to launch with IE 7
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u2
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-08-06
  • Updated: 2010-04-04
  • Resolved: 2008-12-15
Related Reports
Relates :  
Description
OPERATING SYSTEM(S):
-------------------
Windows 2003 Server, Standard Edition SP1 

FULL JDK VERSION(S):
-----------------------
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

Problem Description:
---------------------
Launching a converted applet (converted using template 2 of Htmlconverter ie. Extended (Standard + All Browsers/platforms)) with IE7 gave Runtime Exception and crashed the browser. Problem is not seen with IE6.

TESTCASE DESCRIPTION
---------------------
Test case launches applets converted using HTMLConverter.
 
STEPS TO REPRODUCE

1) Download and install the above mentioned Sun java build. Set the
   PATH to java executable
2) Install Internet Explorer 7
3) Associate java plugin with IE7 and enable java console by following
   the following steps:
	a) From system control panel, launch the java control panel
           (cup icon)
	b) Go to Advanced tab -> java console -> select show console
           radio button
	c) Expand the applet tag and check Internet explorer check box
        d) Click on Apply and OK.

5) Launch IE and try to access the converted html (jversion-plugin.html)


TESTCASE SOURCE

-------------
jversion.java
-------------
import java.awt.*;
import java.applet.*;

public class jversion extends Applet {
	public void paint(Graphics g) {
		g.drawString("Java RunTime Environment is: "+System.getProperty("java.vendor")+" "+System.getProperty("java.version"), 20, 20);
	}
}

--------------------------------
jversion-plugin.html (converted)
--------------------------------
<HTML>
<BODY>
<H5> jversion-plugin1.html </H5> <title>Java -version</title>
<hr>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<object
    classid = "clsid:CAFEEFAC-0016-0000-0000-ABCDEFFEDCBA"
    codebase = "http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0"
    WIDTH = 400 HEIGHT = 30 >
    <PARAM NAME = CODE VALUE = "jversion.class" >
    <param name = "type" value = "application/x-java-applet;jpi-version=1.6">
    <param name = "scriptable" value = "false">

    <comment>
	<embed
            type = "application/x-java-applet;jpi-version=1.6" \
            CODE = "jversion.class" \
            WIDTH = 400 \
            HEIGHT = 30
	    scriptable = false
	    pluginspage = "http://java.sun.com/products/plugin/index.html#download">
	    <noembed>
            
            </noembed>
	</embed>
    </comment>
</object>

<!--
<APPLET CODE = "jversion.class" WIDTH = 400 HEIGHT = 30>


</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->

<hr>
<B><hr size=2><H5> jversion-plugin2.html </H5> <hr>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<script language="JavaScript" type="text/javascript"><!--
    var _info = navigator.userAgent;
    var _ns = false;
    var _ns6 = false;
    var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
//--></script>
    <comment>
        <script language="JavaScript" type="text/javascript"><!--
        var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
        var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
//--></script>
    </comment>

<script language="JavaScript" type="text/javascript"><!--
    if (_ie == true) document.writeln('<object classid="clsid:CAFEEFAC-0016-0000-0000-ABCDEFFEDCBA" WIDTH = 400 HEIGHT = 30  codebase="http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0"><noembed><xmp>');
    else if (_ns == true && _ns6 == false) document.writeln('<embed ' +
	    'type="application/x-java-applet;jpi-version=1.6" \
            CODE = "jversion.class" \
            WIDTH = 400 \
            HEIGHT = 30 ' +
	    'scriptable=false ' +
	    'pluginspage="http://java.sun.com/products/plugin/index.html#download"><noembed><xmp>');
//--></script>
<applet  CODE = "jversion.class" WIDTH = 400 HEIGHT = 30></xmp>
    <PARAM NAME = CODE VALUE = "jversion.class" >
    <param name="type" value="application/x-java-applet;jpi-version=1.6">
    <param name="scriptable" value="false">


</applet>
</noembed>
</embed>
</object>


<!--
<APPLET CODE = "jversion.class" WIDTH = 400 HEIGHT = 30>


</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->

<hr>
<B><hr size=2><H5> jversion-plugin3.html </H5> <hr>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<object
    classid = "clsid:CAFEEFAC-0016-0000-0000-ABCDEFFEDCBA"
    codebase = "http://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=6,0,0,0"
    WIDTH = 400 HEIGHT = 30 >
    <PARAM NAME = CODE VALUE = "jversion.class" >
    <param name = "type" value = "application/x-java-applet;jpi-version=1.6">
    <param name = "scriptable" value = "false">

    
</object>


<!--
<APPLET CODE = "jversion.class" WIDTH = 400 HEIGHT = 30>


</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->

<hr>
<B><hr size=2><H5> jversion-plugin4.html </H5> <hr>
<!--"CONVERTED_APPLET"-->
<!-- HTML CONVERTER -->
<embed
            type = "application/x-java-applet;jpi-version=1.6" \
            CODE = "jversion.class" \
            WIDTH = 400 \
            HEIGHT = 30
            scriptable = false
            pluginspage = "http://java.sun.com/products/plugin/index.html#download">
	    <noembed>
            
            </noembed>
</embed>

<!--
<APPLET CODE = "jversion.class" WIDTH = 400 HEIGHT = 30>


</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->

<hr>
<B><hr size=2></BODY>
</HTML>

Comments
EVALUATION The problem seems to be in <noembed> tag. See CR 6484462. Tested with latest IE7 on Windows Vista, browser does not crash. However, it does not load the applet (the second applet in the page) either. Java plugin complains about "CODE" parameter missing in applet tag. We are going to stop shipping and supporting HTMLConverter in jdk7. Close this CR as will not fix.
15-12-2008

WORK AROUND None
06-08-2007