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

RI deviates from JVMS - non-zero minor_version for class files throws UnsupportedClassVersionError.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b25
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        Table 4.1-A. class file format version ranges (by Java SE Platform) of JVMS states that all class file versions from 45.0 to 55.0 (both inclusive) are supported for Java SE 11. and 45.0 to 56.0 for Java SE 12.
        This means that, say 45.1, 46.46 or 50.91 are all to be supported implicitly. But RI throws an exception:
        Exception in thread "main" java.lang.UnsupportedClassVersionError: B (class file version 53.1) was compiled with an invalid non-zero minor version
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:334)
        at Wrapper.main(Wrapper.java:3)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hseigel Harold Seigel
                Reporter:
                pchinnasamy Prabushankar Chinnasamy
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: