GeezerVison is showing docs.oracle.com — Process (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.lang
Class Process
-
-
Constructor Summary
Constructors
| Constructor |
Description |
Process() |
|
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
| Modifier and Type |
Method |
Description |
abstract void |
destroy() |
Kills the subprocess.
|
Process |
destroyForcibly() |
Kills the subprocess.
|
abstract int |
exitValue() |
Returns the exit value for the subprocess.
|
abstract InputStream |
getErrorStream() |
Returns the input stream connected to the error output of the
subprocess.
|
abstract InputStream |
getInputStream() |
Returns the input stream connected to the normal output of the
subprocess.
|
abstract OutputStream |
getOutputStream() |
Returns the output stream connected to the normal input of the
subprocess.
|
boolean |
isAlive() |
Tests whether the subprocess represented by this Process is
alive.
|
abstract int |
waitFor() |
Causes the current thread to wait, if necessary, until the
process represented by this Process object has
terminated.
|
boolean |
waitFor(long timeout,
TimeUnit unit) |
Causes the current thread to wait, if necessary, until the
subprocess represented by this Process object has
terminated, or the specified waiting time elapses.
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
waitFor
public abstract int waitFor()
throws InterruptedException
Causes the current thread to wait, if necessary, until the
process represented by this Process object has
terminated. This method returns immediately if the subprocess
has already terminated. If the subprocess has not yet
terminated, the calling thread will be blocked until the
subprocess exits.
- Returns:
- the exit value of the subprocess represented by this
Process object. By convention, the value
0 indicates normal termination.
- Throws:
InterruptedException - if the current thread is
interrupted by another
thread while it is waiting, then the wait is ended and
an InterruptedException is thrown.
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|