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

Regression, JDK 5 compiled package-info class not loaded by Mustang b71

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 6
    • 6
    • hotspot
    • b73
    • sparc
    • generic

      The following scenario works well with B70. This is a regression.

      A package-info.java contains an annotated package. These classes (annotation + package-info) are compiled using JDK 5 (build 1.5.0_06-b05) target 1.5.

      package-info class is then loaded (thanks to Class.forName) in a Mustang b71 application.
      A java.lang.ClassFormatError is thrown at load time.

      I attached the annotation, the package-info and Main classes.


      Exception in thread "main" java.lang.ClassFormatError: Illegal class modifiers in class packageinfo/package-info: 0x200
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
              at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:169)
              at runpackageinfo.Main.main(Main.java:27)

            kamg Keith Mcguigan (Inactive)
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: