There is a method in System called runFinalizersOnExit(boolean) that
supposedly will let you tell the jvm to run all finalizers when the jvm is
shut down.  However, I've heard it's not that reliable, and I notice that
it has been deprecated in jdk1.2.  

On Tue, 8 Jun 1999, Jonas Holmberg wrote:

> How can I make a method being called before the jvm exits when killing
> the jvm (or pressing Ctrl-C if its in the foreground)?
> 
> I suppose a pure java way is out of the question? What is the least OS
> dependant way?
> 
> What I want is to do some cleanup before stopping a server written in
> java only. And it must perform the cleanup if the computer is shut down,
> i.e. when the jvm is killed.
> 
> Thanks for a great mailing list!
> /Jonas Holmberg, Forget-it AB
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to