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

Interpreter cannot load class files with names >= 247 symbols

    XMLWordPrintable

Details

    • 1.2beta3
    • sparc
    • solaris_2.4
    • Verified

    Description



      Name: akC45999 Date: 12/26/97



      Under Solaris JDK trying to get a static field of a class with
      somewhat long name (247 ASCII characters) VM ends up with
      a NoClassDefFoundError (though compiler generates the corresponding
      class file).

      The JVMS says nothing on the limits that JDK interpreter may impose on
      the length of class name.

      --------------------- LongNameTest1.java
      public class LongNameTest1 {

      public static void main(String arg[]) {
      Object x = null;
      try {
      x = c123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456.f;
      } catch (Throwable e) {
      System.out.println("Unexpected exception : " + e);
      return;
      }
      System.out.println("Ok");
      }

      }

      class c123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 {

      public static Object f;

      }
      --------------------- end of LongNameTest1.java

      Output:
      %jc LongNameTest1.java
      %/export/ld14/java/dest/jdk1.2b3A/solaris/bin/java LongNameTest1
      Unexpected exception : java.lang.NoClassDefFoundError: c123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
      %

      Making the class name a character shorter results in normal execution.

      JDK versions affected: all versions for Solaris.

      ======================================================================
      ======================================================================

      Attachments

        Activity

          People

            sliangsunw Sheng Liang (Inactive)
            rfqsunw Rfq Rfq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: