Name: sg39081 Date: 06/30/97
The program at the bottom of this message works fine when run
outside the debugger but gets the following non-recoverable error
when run within the JDK 1.1.1 version of JDB:
E:\INTRASPECT>e:\jdk1.1.1\bin\jdb
Initializing jdb...
> run awttest
running ...
main[1]
Uncaught exception: java.lang.ArrayIndexOutOfBoundsException -1 < 0
at java.util.Vector.elementAt(Vector.java:326)
at java.awt.List.getItem(List.java:142)
at sun.awt.windows.WToolkit.run(WToolkit.java:103)
at java.lang.Thread.run(Thread.java:474)
AWT-Windows[1]
--------------------------
import java.awt.*;
public class awttest extends Frame {
Menu servermenu;
MenuItem exitServer;
List connection_list;
public static void main (String args[]) {
awttest mytest = new awttest ();
mytest.doit ();
}
void doit () {
connection_list = new List();
add("Center", connection_list);
resize(new Dimension(400,200));
show();
MenuBar mb = new MenuBar();
servermenu = new Menu("Server");
servermenu.add(exitServer = new MenuItem("Exit"));
mb.add(servermenu);
setMenuBar(mb);
}
public boolean handleEvent(Event event) {
switch(event.id) {
case Event.WINDOW_DESTROY:
System.out.println("Window Destroy called");
Runtime.getRuntime().exit(0);
return true;
}
return super.handleEvent(event);
}
public boolean action(Event event, Object arg) {
if (event.target instanceof MenuItem) {
String label = (String) arg;
if (event.target == exitServer) {
Runtime.getRuntime().exit(0);
return true;
}
}
return super.action(event, arg);
}
}
company - Intraspect Software , email - ###@###.###
======================================================================
- duplicates
-
JDK-4042898 win32: Assertion failure awt_Component.cpp line 1358
-
- Closed
-
- relates to
-
JDK-4122048 STD: Exception thrown in debugger (halting execution), not thrown in java_g
-
- Closed
-