Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35455
| From | Nigel Wade <nmw@local.domain> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How do I terminate a JVM properly? |
| Date | 2016-08-25 15:04 +0100 |
| Message-ID | <e28c7cFesc9U1@mid.individual.net> (permalink) |
| References | (1 earlier) <10fc56da-c03f-41a7-93b8-c7eeb6d24279@googlegroups.com> <npl47i$1ps$1@dont-email.me> <7b27f662-d2e0-4649-8e4d-5e14e790bd14@googlegroups.com> <e287viFdr8sU1@mid.individual.net> <4fe5062e-9db3-4e91-9cfb-deeb8d51461a@googlegroups.com> |
On 25/08/16 14:05, Eric Douglas wrote: > On Thursday, August 25, 2016 at 8:52:12 AM UTC-4, Nigel Wade wrote: >> In your original post you stated that: >> "After I dispose the last GUI object the JVM should terminate itself." >> >> Indeed it should. But where exactly, in the code below, do you dispose of the GUI objects you've created? >> (FYI, close != dispose). >> >> The EDT will not exit as long as there are displayable components left which the JVM is managing. >> (displayable != visible). >> > > It appears to destroy the window when you click the X. It closes the window. Nothing else. > DISPOSE_ON_CLOSE is not the default? Let's try adding that. No, it's not the default. > I normally set windows to DO_NOTHING_ON_CLOSE with a WindowListener looking for the close event to do some cleanup before calling dispose(). I left that out of the simple test thinking it shouldn't be necessary. > I do remember testing yesterday that the window was showing isDisplayable() = true before calling dispose(). > > So, if console is visible (as a developer mine normally is, I put debug messages in there), the JVM stays active apparently on a deadlock until you manually close the console with it's Close button. With an explicit call to dispose the JVM does terminate if console is not visible. (our normal application API does automatically close that console window, must be calling System.exit) Is the JVM still running, or just the console? I don't use Windows much, so wouldn't know what the Windows Java console window does. If you want to know if your application is exiting cleanly run it from the command line and see if it exits.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-24 08:14 -0700
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-24 14:00 -0700
Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-24 17:39 -0400
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 05:24 -0700
Re: How do I terminate a JVM properly? Nigel Wade <nmw@local.domain> - 2016-08-25 13:52 +0100
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 06:05 -0700
Re: How do I terminate a JVM properly? Nigel Wade <nmw@local.domain> - 2016-08-25 15:04 +0100
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 08:20 -0700
Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-25 15:55 -0400
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 13:35 -0700
Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-25 16:58 -0400
Re: How do I terminate a JVM properly? Arne Vajhøj <arne@vajhoej.dk> - 2016-08-28 13:29 -0400
Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-28 13:53 -0400
Re: How do I terminate a JVM properly? Arne Vajhøj <arne@vajhoej.dk> - 2016-08-28 14:14 -0400
Re: How do I terminate a JVM properly? Eric Douglas <e.d.programmer@gmail.com> - 2016-08-25 05:52 -0700
Re: How do I terminate a JVM properly? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-08-24 18:19 -0400
Re: How do I terminate a JVM properly? Lew <lewbloch@gmail.com> - 2016-08-24 16:12 -0700
Re: How do I terminate a JVM properly? Roedy Green <inquiry@mindprod.com> - 2016-08-30 16:34 -0700
csiph-web