windowClosing / windowClosed when logging off or shutting down Windows...

From: Will Atkinson (LemonSmasher_at_hotmail.com)
Date: 11/29/03


Date: 29 Nov 2003 13:31:10 -0800

Hi All,

Sorry to post a 'Windows specific' question, although it may well
apply to other operating systems.

I have written a program that times tasks, and it can quite easily be
in the process of timing a task when the user logs off or shuts down
Windows. Currently, it persists out a list of the timed tasks when
windowClosing / windowClosed occurs, (i.e. when the user closes the
program explicitly) but neither of these occur in the case of a log
off / shut down.

Is there any way of determining that the JVM is in the process of
terminating from withing a Java application? I'm guessing that using
'finalize' in my main class isn't going to help, as I know finalize
doesn't necessarily get called.

I'm sure there must be a fairly simple solution to the problem of
users losing timing information when closing by a log off / shutdown -
but I can't find it!

Any help much appreciated!

LemonSmasher.



Relevant Pages

  • Re: Private primitive operations available to entire package hierarchy. Can it be done?
    ... and as you have to create this kind of "constructor" for Ada ... > is removed from all lists and other objects that it is in (obviously, ... we have a list of all top-level windows of the ... > Also getting the app to finalize last is particularly difficult but I ...
    (comp.lang.ada)
  • Re: finalizing photo burns
    ... Is Nero better than the Windows or MS Digital Image or Media Center ... It allowed me to finalize by simply checking one little box. ... should say 0 bytes free if the disk is finalized. ...
    (microsoft.public.windows.mediacenter)
  • Re: CD Burned, not finalised and PC rebuilt now cant read CD
    ... You used WinXP's burning software, or software that was installed in WinXP? ... installation, you need to reinstall that software in order to finalize ... Windows help - www.rickrogers.org ... >>> I have a CDR that I burned on XP and did not finalize. ...
    (microsoft.public.windowsxp.general)
  • Re: cant read burned cd of pictures?
    ... > he burned them with windows 98. ... He had burning software installed. ... > this be a multi-session problem? ... finalize them. ...
    (microsoft.public.windowsxp.general)
  • Re: Burning JPEG files
    ... Did you finalize the disk or leave it open so you could add more. ... Players ... I have Roxio Easy CD Creater 5 software and Windows ...
    (microsoft.public.windowsxp.help_and_support)