Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4403951

1.3 plugin hangs on win2k when installing extensions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.3.0
    • deploy
    • x86
    • windows_nt



      Name: pa48320 Date: 01/11/2001

      The Extension mechanism in the JRE allows a jar to contain an installation class that will install the jar as an extension. On Windows 2000 this process hangs. Create the following applet and add it to a jar called hello.jar. Use the manifest:
      Extension-List: HelloExt
      HelloExt-Extension-Name: HelloExt
      HelloExt-Specification-Version: 1.0
      HelloExt-Implementation-URL: http://<machine name>/w2k/HelloExt.jar

      applet code:
      import java.applet.*;
      import java.awt.*;
      import javax.swing.*;

      public class HelloWorldApplet extends JApplet
      {
      public void init() {
      Container c = getContentPane();
      c.setLayout( new FlowLayout(FlowLayout.CENTER) );

      c.add( new JLabel("HelloWorldApplet") );
      }
      }

      Create the following class for installing an extension and put it in HelloExt.jar with the following manifest:
      Extension-Name: HelloExt
      Specification-Vendor: SAS Institute Inc.
      Implementation-Vendor-Id: com.sas
      Implementation-Vendor: SAS Institute Inc.
      Specification-Version: 1.0
      Implementation-Version: 1.0
      Main-Class: HelloExtInstall



      public class HelloExtInstall
      {
      public static void main(String args[]) {
      }
      }


      Sign HelloExt.jar. Now create hello.html as follows:
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
      <HTML>
      <HEAD>
      <TITLE>HelloWorldApplet</TITLE>
      </HEAD>
      <BODY>
      <HR>
      <SCRIPT LANGUAGE="JavaScript"><!--
      var _info = navigator.userAgent;
      var _ns = false;
      var _ie = (_info.indexOf("MSIE") > 0
           && _info.indexOf("Win") > 0
           && _info.indexOf("Windows 3.1") < 0);
      //--></SCRIPT>
      <COMMENT>
      <SCRIPT LANGUAGE="JavaScript1.1"><!--
          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) ));
      //--></SCRIPT>
      </COMMENT>
      <SCRIPT LANGUAGE="JavaScript"><!--
      if (_ie == true) {
      document.writeln(" <OBJECT");
      document.writeln(" CLASSID=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"");
      document.writeln(" CODEBASE=\"http://java.sun.com/products/plugin/1.3.0_01/jinstall-130_01-win32.cab#Version=1,3,0,1\"");
      document.writeln(" HEIGHT=400");
      document.writeln(" WIDTH=600");
      document.writeln(" >");
      document.writeln(" <NOEMBED><XMP>");
      }
      else if (_ns == true) {
      document.writeln(" <EMBED");
      document.writeln(" PLUGINSPAGE=\"http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html\"");
      document.writeln(" TYPE=\"application/x-java-applet;jpi-version=1.3.0_01\"");
      document.writeln(" HEIGHT=400");
      document.writeln(" WIDTH=600");
      document.writeln(" ARCHIVE=\"Hello.jar\"");
      document.writeln(" CODE=\"HelloWorldApplet.class\"");
      document.writeln(" ><NOEMBED><XMP>");
      }
      //--></SCRIPT>
      <APPLET CODE="HelloWorldApplet.class" WIDTH=600 HEIGHT=400 ARCHIVE="Hello.jar" ></XMP>
      <PARAM NAME="ARCHIVE" VALUE="Hello.jar">
      <PARAM NAME="CODE" VALUE="HelloWorldApplet.class">
      </APPLET>
      </NOEMBED></EMBED></OBJECT>
      <HR>
      </BODY>
      </HTML>

      Run using Hello.html.

      Approve downloading of HelloExt.jar. Approve HelloExt's signed identity. A console window is created to run HelloExt main class HelloExtInstaller, but it hangs and never finishes.

      ======================================================================

            stanleyh Stanley Ho (Inactive)
            pallenba Peter Allenbach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: