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

Specifying java_version parameter to run earlier JRE family with 1.6.0u10 fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 6u10
    • deploy
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      JRE 1.4.2_17 and 1.6.0_10

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP Pro SP2

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Windows is running as virtual image deployed under VMWare. Otherwise, is basic XP SP2 image. Version of Internet Explorer is 6.

      A DESCRIPTION OF THE PROBLEM :
      Machine starts with no Java VMs of any kind installed. Install JRE 1.4.2_17, run an applet successfully in Internet Explorer using OBJECT tag that uses dynamic version classid. Works fine.

      Now install JRE 1.6.0_10. Adjust OBJECT tag to specify a "java_version" parameter with a value of "1.4*", which should select the latest JRE from the 1.4.x family. Try to run applet in IE, but applet fails to load. The 1.4.2_17 VM appears to start, as evidenced by the system tray icon whose pop-up menu says "Open 1.4.2_17 console". But attempting to open the console results in a console window with a gray panel in it.

      Locating the trace file in the Application Data folder shows this exception and other info in the console:

      java.lang.NoClassDefFoundError: sun/awt/DesktopBrowse
      at sun.plugin2.applet.Applet2Environment.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.handleMessageSetJVMID(Unknown Source)
      at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source)
      at sun.plugin2.main.client.PluginMain.run(Unknown Source)
      at sun.plugin2.main.client.PluginMain.main(Unknown Source)
      security: property package.access value sun.
      security: property package.access new value sun.,com.sun.javaws
      security: property package.access value sun.,com.sun.javaws
      security: property package.access new value sun.,com.sun.javaws,com.sun.deploy
      security: property package.definition value null
      security: property package.definition new value com.sun.javaws
      security: property package.definition value com.sun.javaws
      security: property package.definition new value com.sun.javaws,com.sun.deploy
      security: property package.definition value com.sun.javaws,com.sun.deploy
      security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp
      security: property package.access value sun.,com.sun.javaws,com.sun.deploy
      security: property package.access new value sun.,com.sun.javaws,com.sun.deploy,org.mozilla.jss
      security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp
      security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss

      I've also tried using the backward compatible classid for specifying a JRE family (classid="clsid:CAFEEFAC-0014-0002-FFFF-ABCDEFFEDCBA"), but that has the same result.

      The exception and symptoms are very similar to bug 6646549, which was closed as a "will not fix", with an evaluation stating that the exceptions are harmless.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Install 1.4.2_17 JRE on machine, then install 1.6.0_10. Create an HTML page with an OBJECT tag that uses java_version parameter to run applet in 1.4 family in Internet Explorer v6. Load applet page, but applet doesn't load.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Applet is expected to load and run using JRE 1.4.2_17, which is the latest JRE of the 1.4* family specified in the java_version parameter.
      ACTUAL -
      Applet does not load, exception appears in console trace:

      java.lang.NoClassDefFoundError: sun/awt/DesktopBrowse
      at sun.plugin2.applet.Applet2Environment.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.handleMessageSetJVMID(Unknown Source)
      at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source)
      at sun.plugin2.main.client.PluginMain.run(Unknown Source)
      at sun.plugin2.main.client.PluginMain.main(Unknown Source)

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in console trace file:

      java.lang.NoClassDefFoundError: sun/awt/DesktopBrowse
      at sun.plugin2.applet.Applet2Environment.initialize(Unknown Source)
      at sun.plugin2.main.client.PluginMain.handleMessageSetJVMID(Unknown Source)
      at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source)
      at sun.plugin2.main.client.PluginMain.run(Unknown Source)
      at sun.plugin2.main.client.PluginMain.main(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Applet code is unremarkable; just an applet that displays a panel with a label, showing the value of System.getProperty("java.version"). Applet source is compiled with -target 1.4 -source 1.4, though applet itself is not really specific to 1.4:


      package test.ecl.applet;

      import java.applet.Applet;
      import java.awt.*;
      import javax.swing.*;

      public class Java14Applet extends Applet
      {
      public void init()
      {
      System.out.println( "Java14Applet started" );
      }

      public void start()
      {
      JPanel panel = new JPanel();
      panel.setLayout( new BorderLayout() );
      panel.setSize( getSize() );
      JLabel label = new JLabel();

      String version = System.getProperty("java.version");
      if ( version.indexOf( "1.4" ) != -1 )
      {
      label.setText("Java14Applet running");
      label.setForeground( Color.blue );
      }
      else
      {
      label.setText( "Java14Applet requires Java 1.4! Found Java version: " + version );
      label.setForeground( Color.red );
      }
      panel.add( label, BorderLayout.CENTER );
      setLayout( new BorderLayout() );
      add( panel, BorderLayout.CENTER );
      }
      }


      HTML used to load the applet contains this:

      <html>
      <head>
      <title>Java 1.4 applet</title>
      </head>
      <body>
      <h3>Java 1.4 Applet with Object tag requiring 1.4.2</h3>
      <object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
          codebase = "http://java.sun.com/update/1.4.2/jinstall-1_4_2_17-windows-i586.cab#Version=1,4,0,0"
          width = "600"
          height = "400"
          name = "Java14Applet" >
          <PARAM NAME = "code" VALUE = "Java14Applet" >
          <PARAM NAME = "codebase" VALUE = "http://servername/session" >
          <PARAM NAME = "name" VALUE = "Java14Applet" >
          <param name="java_version" value="1.4*">
      </object>
      </body>
      </html>

      Alternative classid used to request 1.4.2 family JRE is:

      classid="clsid:CAFEEFAC-0014-0002-FFFF-ABCDEFFEDCBA"

      ---------- END SOURCE ----------

      Release Regression From : 6u6
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            ccheung Calvin Cheung
            ryeung Roger Yeung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: