| |
|
| java.lang.Object java.lang.ProcessBuilder
ProcessBuilder | final public class ProcessBuilder (Code) | |
A builder for creating OS-specific processes.
since: 1.5 |
ProcessBuilder | public ProcessBuilder(String... command)(Code) | |
Constructs an instance with the given command.
Parameters: command - The program and arguments. |
ProcessBuilder | public ProcessBuilder(List<String> command)(Code) | |
Constructs an instance with the given command.
Parameters: command - The program and arguments. throws: NullPointerException - if command is null . |
command | public List<String> command()(Code) | |
The builder's current program and arguments. The returned value is
considered live and modifications to it will change the state of the
instance.
The program and arguments currently set. |
command | public ProcessBuilder command(String... command)(Code) | |
Changes the program and arguments to the command given.
Parameters: command - The program and arguments. A reference to this instance. |
command | public ProcessBuilder command(List<String> command)(Code) | |
Changes the program and arguments to the command given. The list passed
is not copied, so any subsequent updates to it are reflected in this
instance's state.
Parameters: command - The program and arguments. A reference to this instance. throws: NullPointerException - if command is null . |
directory | public File directory()(Code) | |
The working directory that's currently set. If this value is
null , then the working directory of the Java process is
used.
The current working directory, which may be null . |
directory | public ProcessBuilder directory(File directory)(Code) | |
Changes the working directory to the directory given. If the given
directory is null , then the working directory of the Java
process is used when a process is started.
Parameters: directory - The working directory to set. A reference to this instance. |
environment | public Map<String, String> environment()(Code) | |
The builder's current environment. When an instance is created, the
environment is populated with a copy of the environment, as returned by
System.getenv . The Map returned is live and any changes made
to it are reflected in this instance's state.
The Map of the current environment variables. |
redirectErrorStream | public boolean redirectErrorStream()(Code) | |
Indicates whether or not the standard error should be redirected to
standard output. If redirected, the
Process.getErrorStream will
always return end of stream and standard error is written to
Process.getInputStream .
Indicates whether or not standard error is redirected. |
redirectErrorStream | public ProcessBuilder redirectErrorStream(boolean redirectErrorStream)(Code) | |
Changes the state of whether or not standard error is redirected.
Parameters: redirectErrorStream - true to redirect standard error,false if not. A reference to this instance. |
|
|
|