Submitted On 12-JAN-1998
sz9
In complex systems it is tricky! This bug seems to be
described under Bug ID: 4014091, as well, but there
it is declared a feature used by legacy applications.
I have made up a framework for educational purposes
which consists (apart from other things) of an
abstraction from the actual IO system used (be it AWT,
console or even a bank terminal) In the entire program
the reuser does not have to bother whether he uses
AWT or anything else, but when ending the application
he will have to explicitly call System.exit. Although
this does not appear to be too tricky it is
a) inconvenient and can
b) become tricky if you intend to use several IO
systems working in parallel inside of one
application.
Submitted On 19-FEB-1998
jsnielsen@novell.com
I have been unsuccessful in getting any
work-around to function properly. Specifically,
Thread.stop(), Thread.interrupt(), and
Thread.destroy() do not affect the "AWT-Windows"
thread, thus, leaving the trivial application with
at least one additional thread in it's main thread.
Question: in your "work-around" what do you mean
by "kill the AWT-Windows thread"? How can any
thread be "kill"ed in Java?
Submitted On 23-JUN-1998
kyledavis
I've seen several variations of this bug described here, and many have been
marked closed with no fix. I SERIOUSLY hope this bug# will not meet with the
same fate.
Calling System.exit() is unacceptable. It STOPS THE JVM! I should simply be
able to discard all of my objects, stop all of the threads *I* created, and the
JVM should clean up the rest.
Submitted On 22-OCT-1998
aw
This is a real problem when embedding the JVM in a 3rd party application via
the JNI invocation API (e.g. embedding JVM in a web browser as a plugin/ActiveX
control). If you call System.exit, then the hosting application (browser) will
exit. If you call the JNI DestroyJavaVM() function, it blocks forever waiting
for the AWT thread to finish.
java.awt.Toolkit should expose an exitEventLoop() method.
Submitted On 18-FEB-2000
DaleKing
In reading other bug evaluations there was supposedly some
concern about changing this behavior at this late date. If
that is a concern I would suggest just adding a method
(probably in the awt toolkit) that basically checked to see
if it had any current awt components displayed and if not,
shut down the threads. That way you only get the new, more
correct behavior if you ask for it.
Submitted On 09-OCT-2000
samyuen
It is really a shame that this huge bug wasn't fixed yet or a workaround created within the JDK. I couldn't
manage to stop the awt thread in a test.
Submitted On 04-DEC-2000
davidholmes
Why on earth has this bug been closed as not reproducible?
The AWT threads do not shutdown when all frames are closed,
this is a known problem in the AWT design and should
finally be addressed in Merlin. For now this bug continues
to exist in all JDK versions up to and including 1.3.0_01
and is trivially reproducible.
Re-open this bug, or mark it fixed in Merlin!
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|