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

Java 8u51 .. can not start java 6 applet application over webstart

XMLWordPrintable

    • x86
    • windows_vista

      FULL PRODUCT VERSION :
      java version "1.8.0_51"
      Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
      Java HotSpot(TM) Client VM (build 25.51-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows Vista Enterprise (6002: SP2)
      Windows 7 - 64bit Enterprise (7601: SP1)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      system integration java 1.8.0_51
      Webstart enabled java versions: 1.6.0_43, 1.7.0_17, 1.7.0_45, 1.7.0_72
      separate company signature on cacert keystore

      A DESCRIPTION OF THE PROBLEM :
      a java applet to start on jre 1.6.0_43 over Java Webstart (Java 8 u 51) is broken:

      here a simple test system with this szenario:
      - start as Applet on WebSite with JNLP: ok
      - start as Application with JNLP: error ... ClassNotFoundException: GetJavaVersion
      java.lang.ClassNotFoundException: GetJavaVersion
      at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
      at sun.plugin2.applet.JNLP2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      - start as Application from command line: <pathJre16043>java.exe -jar GetJavaVersion ... ok
      - start as Application from command line: <pathJre16043>java.exe -cp GetJavaVersion GetJavaVersion ... ok
      (jar format is compatible)

      broken only on application (applet) start over webstart.
      with a jre version 1.7.0_17 as runtime for application i don't error on this jnlp and jar.
      on jre 1.7.0_72 as systemintegrated java version, the applet start as application over webstart on java 1.6.0_43



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      --- FILE:GetJavaVersion.java ---

      import java.applet.*;
      import java.awt.*;
      import javax.swing.*;
      import java.net.*;
      import java.awt.event.ActionListener;
      import java.awt.event.ActionEvent;

      public class GetJavaVersion extends Applet
      {
        private static String getVersion()
          throws Exception
        {
          String Ver = "";
          try{
            Ver = System.getProperty("java.version");
          }
          catch(Exception e){
            throw new Exception( e);
          }
          return Ver;
        }
        
        private static String getVendor()
          throws Exception
        {
          String Ven = "";
          try{
            Ven = System.getProperty("java.vendor");
          }
          catch( Exception e){
            throw new Exception( e);
          }
          return Ven;
        }
        
        public void init() {
          String ven = "";
          String ver = "";
          Exception eVen = null;
          Exception eVer = null;

          try {
            ven = getVendor();
          }
          catch( Exception e) {
            eVen = e;
          }
          try {
            ver = getVersion();
          }
          catch( Exception e) {
            eVer = e;
          }

          if( eVer == null && eVen == null) {
       

            this.setBackground( Color.green);
          }
          else {
            this.setBackground( Color.red);
            if( eVen != null) { ven = eVen.toString(); }
            if( eVer != null) { ver = eVer.toString(); }
          }
          this.setLayout( new GridLayout( 2, 1));
          this.add( new Label( "Java Version: " + ver));
          this.add( new Label( "Vendor: " + ven));
        }

        public String getAppletInfo() {
          return "a test to get java version...";
        }

        public static void main( String[] args)
        {
          JFrame f = new JFrame( "GetJavaVersion Application");
          f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
          GetJavaVersion me = new GetJavaVersion();

          me.init();
          me.start();

          f.add( "Center", me);

          

          f.setSize( 300, 80);
          f.setVisible( true);
        }
        
      }


      --- FILE: APPLICATION_TEMPLATE.JNLP ---
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="*">
        <information>
          <title>GetJavaVersion</title>
          <vendor>DB Systel GmbH</vendor>
        </information>
        <update check="always" policy="always" />
        <resources>
          <!-- Application Resources -->
          <j2se version="*"
                href="http://java.sun.com/products/autodl/j2se" />
          <jar href="GetJavaVersion.jar" main="true" />
        </resources>
        <applet-desc
           name="GetJavaVersion"
           main-class="GetJavaVersion"
           width="300"
           height="60" >
        </applet-desc>
      </jnlp>

      --- FILE: GetJavaVersion.jnlp (original a server script with dynamic java Version ---
      <?xml version="1.0" encoding="UTF-8" ?>
      <jnlp spec="1.0+" codebase="URL2SERVERWITHPATH">
        <information>
          <title>GetJavaVersion</title>
          <vendor>DB Systel GmbH</vendor>
        </information>
        <update check="always" policy="always" />
        <resources>
          <!-- Application Resources -->
          <j2se version="1.6.0_43"
                href="http://java.sun.com/products/autodl/j2se" />
          <jar href="GetJavaVersion.jar" main="true" />
        </resources>
        <applet-desc
          name="GetJavaVersion"
          main-class="GetJavaVersion"
          width="300"
          height="60" >
        </applet-desc>
      </jnlp>
      ---------- END SOURCE ----------

      SUPPORT :
      YES

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: