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

java.lang.UnsupportedClassVersionError occurs while accessing an applet

XMLWordPrintable

    • b01
    • windows

        FULL PRODUCT VERSION :
        JDK 7, JDK 8, JDK 9

        ADDITIONAL OS VERSION INFORMATION :
        MS Windows OS

        A DESCRIPTION OF THE PROBLEM :
        The applet compiled for JDK 7 starts loading and fails with "java.lang.UnsupportedClassVersionError" exception, if the following 3 conditions are met:

        1. The applet is deployed by "OBJECT" tag in HTML page.
        2. The applet requires JRE from JRE 1.7 family by specifying the next attribute and element in "OBJECT" tag:

            - classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
            - <param name="java_version" value="1.7*"/>

        3. JRE 7u13, JRE 6u26 are installed on a host with Windows OS, but only JRE 6u26 is enabled in Java Control Panel.

        REPRODUCIBILITY :
        The test case allowing to reproduce the issue with JRE 7, JRE 8, JRE 9 is attached to the bug as "TestCase.zip" file. The test case contains:
        - Source code of the applet.
        - 3 HTML pages with the applet declaration, which correspond to testable JRE family.
        - Manifest file.
        - 3 Signed JAR archives containing the applet and Manifest file.
        - CER Certificate which was used for signing of 3 JAR archives.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Upload all HTML, JAR files from the attached test case to the accessible web server.
        2. Install JRE 6 which is equal to or above the current security baseline.
        3. Install the testable JRE 7, or JRE 8, or JRE 9.
        4. Disable the installed JRE 7, or JRE 8, or JRE 9 and enable JRE 6 in Java Control Panel.
        5. Import "testcase.cer" certificate from the attached test case through "Java Control Panel -> Security -> Manage Certificates... -> Certificate type: Signer CA -> User -> Import".
        6. Open Internet Explorer browser and load HTML page with the test from the step #1, whose name corresponds to currently testable JRE family (7, or 8, or 9).
        7. Observe that the applet was loaded with JRE 6, what is wrong, since it explicitly required JRE 7 family in "object" tag of HTML page, and could not run, because "java.lang.UnsupportedClassVersionError" occurred.

              alitvinov Anton Litvinov (Inactive)
              asaha Abhijit Saha
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: