| CHAPTER 12: Execution |
Previous |
Java Language |
Index |
Next |
A Java Virtual Machine terminates all its activity and exits when one of two things happens:
A Java program can specify that the finalizers of all objects that have finalizers, and all classes that have class finalizers, that have not yet been automatically invoked are to be run before the virtual machine exits. This is done by invoking the method runFinalizersOnExit
of class System
with the argument true
. The default is to not run finalizers on exit, and this behavior may be restored by invoking runFinalizersOnExit
with the argument false
. An invocation of the runFinalizersOnExit
method is permitted only if the caller is allowed to exit
, and is otherwise rejected by the SecurityManager
(S20.17).
| © 1996 Sun Microsystems, Inc. All rights reserved. |