mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8290036: Define and specify Runtime shutdown sequence
Reviewed-by: dholmes, alanb
This commit is contained in:
parent
0ec18382b7
commit
d4142d8441
3 changed files with 143 additions and 115 deletions
|
@ -1885,24 +1885,24 @@ public final class System {
|
|||
}
|
||||
|
||||
/**
|
||||
* Terminates the currently running Java Virtual Machine. The
|
||||
* argument serves as a status code; by convention, a nonzero status
|
||||
* code indicates abnormal termination.
|
||||
* Initiates the <a href="Runtime.html#shutdown">shutdown sequence</a> of the
|
||||
* Java Virtual Machine. This method always blocks indefinitely. The argument
|
||||
* serves as a status code; by convention, a nonzero status code indicates
|
||||
* abnormal termination.
|
||||
* <p>
|
||||
* This method calls the {@code exit} method in class
|
||||
* {@code Runtime}. This method never returns normally.
|
||||
* This method calls the {@code exit} method in class {@code Runtime}. This
|
||||
* method never returns normally.
|
||||
* <p>
|
||||
* The call {@code System.exit(n)} is effectively equivalent to
|
||||
* the call:
|
||||
* The call {@code System.exit(n)} is effectively equivalent to the call:
|
||||
* <blockquote><pre>
|
||||
* Runtime.getRuntime().exit(n)
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @param status exit status.
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its {@code checkExit}
|
||||
* method doesn't allow exit with the specified status.
|
||||
* @see java.lang.Runtime#exit(int)
|
||||
* @param status exit status.
|
||||
* @throws SecurityException
|
||||
* if a security manager exists and its {@code checkExit} method
|
||||
* doesn't allow exit with the specified status.
|
||||
* @see java.lang.Runtime#exit(int)
|
||||
*/
|
||||
public static void exit(int status) {
|
||||
Runtime.getRuntime().exit(status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue