Some code to show JVM doesn't exit.
output:
d = 10 ThreadGroup main
1 Runner 10
d = 0 ThreadGroup main
java.lang.ArithmeticException: / by zero
at Runner.run(Test.java:8)
at java.lang.Thread.run(Thread.java:484)
1 Runner 10
1 Runner 10
..
..
1 Runner 10
One thread dies after divide by 0. The other thread continues.
Both of them belong to "main" group.
From the "uncaughtException" API
...
Called by the
Java Virtual Machine when a thread in this
thread group stops because of an uncaught exception.
...
I interpret this as:
An uncaught exception causes a thread to die and then the uncaughtException
method is called in the ThreadGroup.
However if other user threads are still running, the JVM
should keep running.
Do you agree?
[This message has been edited by rajsim (edited July 19, 2000).]