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

(1.1)long class name prevents from class instance creation

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description



      Name: szC45993 Date: 03/12/98



      The JCK
      vm/classfmt/fld/fldnmi004/fldnmi00402/fldnmi00402.html
      test shows that jdk1.1.6J (and others jdk1.1.x) jvm incorrectly rises
      NoClassDefFoundError when long name class instance is created.
      The jdk1.2b3L jvm works fine in this case.
      Short test below and LOG demonstrate this.

      ========================================== LOG:

      novo7% setenv CLASSPATH .
      novo7% /export/ld14/java/dest/jdk1.2b3L/solaris/bin/javac -d . *.java
      novo7% /export/ld14/java/dest/jdk1.2b3L/solaris/bin/java fldnmi00402
      novo7% /export/ld14/java/dest/jdk1.1.6J/solaris/bin/java fldnmi00402
      test fldnmi00402 failed to instantiate class using other long name class:java.lang.NoClassDefFoundError: [[[Lk0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/k0123456789012345678901234567890123456789/fldnmi00402a;
      novo7%

      ========================================== SOURCES:

      --------------------- fldnmi00402.java
      public class fldnmi00402 {

        public static int run() {

      {
      try {
      new fldnmi00402p();
      } catch (Throwable e) {
      System.out.println("test fldnmi00402 failed to instantiate class using other long name class:"+e.toString());
      return 2;
      }
      }

          return 0;
        }

        public static void main(String args[]) {
      System.exit(run());
        }

      }

      --------------------- fldnmi00402p.java
      public class fldnmi00402p {

        public k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.fldnmi00402a[][][] ac;

        public fldnmi00402p() {
      ac = new k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.fldnmi00402a[1][2][3];
      ac[0][1][2]=new k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.fldnmi00402a();
        }

      }
      --------------------- fldnmi00402a.java
      package k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789.k0123456789012345678901234567890123456789;

      public class fldnmi00402a{

       public String str;

      }

      ---------------------

      Hook 5(hook5): test

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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            zsssunw Zss Zss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: