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

jdb -- can't put a break point in applet's init method

XMLWordPrintable

    • 1.0.2
    • sparc
    • solaris_2.5
    • Not verified

        Using the MouseTrack.java program and the example1.html file in ~mem/classes.
        Delete the CatchMe.class file.
        NOTE: MouseTrack has not yet been completely upgraded to beta.

        Do the following:
                % appletviewer -debug example1.html
                        Loading jdb ...
                        0xee301bb8:class(sun.applet.AppletViewer)
                > stop in MouseTrack.init
                        Breakpoint set at MouseTrack.init
                > run
                        run sun.applet.AppletViewer example1.html
                        running ...
                        Breakpoint hit: MouseTrack.init (MouseTrack.java:15)
                Thread-6[1] list
                        11 CatchMe box;
                        12 int onaroll;
                        13
                        14 public void init() {
                        15 => onaroll = 0;
                        16 box = new CatchMe(50, 50, this);
                        17 add(box);
                        18 box.show(); //Should I be doing this?
                        19 resize(500, 500);
                Thread-6[1] step
                        Uncaught exception: java.lang.NullPointerException
                                at MouseTrack.paint(MouseTrack.java:29)
                                at sun.awt.motif.MComponentPeer.paint(MComponentPeer.java:109)
                                at sun.awt.motif.MComponentPeer.handleExpose(MComponentPeer.java:170)
                                at java.lang.Thread.run(Thread.java)
                AWT-Motif[1]

        Why would I have a NullPointerException on this?

              tballsunw Tom Ball (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: