|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Process
Runtime.exec
methods create a native process and
return an instance of a subclass of Process
that can
be used to control the process and obtain information about it.
The Runtime.exec
methods may not work well for special
processes on certain native platforms, such as native windowing
processes, daemon processes, Win16/DOS processes on Win32, or shell
scripts. The created subprocess does not have its own terminal or
console. All its standard io (i.e. stdin, stdout, stderr) operations
will be redirected to the parent process through three streams
(Process.getOutputStream()
,
Process.getInputStream()
,
Process.getErrorStream()
).
The parent process uses these streams to feed input to and get output
from the subprocess. Because some native platforms only provide
limited buffer size for standard input and output streams, failure
to promptly write the input stream or read the output stream of
the subprocess may cause the subprocess to block, and even deadlock.
The subprocess is not killed when there are no more references to
the Process
object, but rather the subprocess
continues executing asynchronously.
Runtime.exec(java.lang.String)
,
Runtime.exec(java.lang.String, java.lang.String[])
,
Runtime.exec(java.lang.String[])
,
Runtime.exec(java.lang.String[], java.lang.String[])
Method Summary | |
abstract void | destroy()
Kills the subprocess. |
abstract int | exitValue()
Returns the exit value for the subprocess. |
abstract InputStream | getErrorStream()
Gets the error stream of the subprocess. |
abstract InputStream | getInputStream()
Gets the input stream of the subprocess. |
abstract OutputStream | getOutputStream()
Gets the output stream of the subprocess. |
abstract int | waitFor()
Waits for the subprocess to complete. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Method Detail |
public abstract OutputStream getOutputStream()
public abstract InputStream getInputStream()
public abstract InputStream getErrorStream()
public abstract int waitFor() throws InterruptedException
waitFor
was
interrupted.public abstract int exitValue()
public abstract void destroy()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |