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

NoClassDefFoundError in BeanBox for multipackaged bean with inner classes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2.0
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.2beta
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Not verified

      Description



      Name: sgC58550 Date: 03/14/97


      BuggyBean is a simple applet with only one new statement in its constructor.
      Construcor of class b of the other package b contains anonymous inner class instantiation.
      This anonymous class has foo() method which calls bar() method of enclosing instance.
      In this case BuggyBean prints java.lang.NoClassDefFoundError.

      This error disappears if the bar() is removed.

      Here is the source of two java files
      BuggyBean.java
      b\b.java

      //////////////////////////////////////////////////////////
      // BuggyBean.java
      //

      import java.applet.*;

      import b.b;

      public class BuggyBean extends Applet
      {
      public BuggyBean ()
      {
      new b ();
      }
      }

      // End of BuggyBean.java

      /////////////////////////////////////////////////////////
      // b.java
      //

      package b;

      class InnerClassBase
      {
      public void foo () {}
      }

      public class b
      {
      public b ()
      {
      new InnerClassBase ()
      {
      public void foo ()
      {
      bar ();
      }
      };
      }

      public void bar () {}
      }

      // End of b.java
      company - PHYSICON , email - ###@###.###
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dstoutamsunw David Stoutamire (Inactive)
              Reporter:
              sgoodsunw Sheri Good (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: