This class is used to create operating system processes.
Create ProcessBuilder
| Constructor | Summary |
|---|---|
| ProcessBuilder(List<String> command) | Creates a process builder with the specified operating system program and arguments. |
| ProcessBuilder(String... command) | Creates a process builder with the specified operating system program and arguments. |
Execute system command
| Return | Method | Summary |
|---|---|---|
| List<String> | command() | Returns this process builder's operating system program and arguments. |
| ProcessBuilder | command(List<String> command) | Sets this process builder's operating system program and arguments. |
| ProcessBuilder | command(String... command) | Sets this process builder's operating system program and arguments. |
Get/set the working directory
| Return | Method | Summary |
|---|---|---|
| File | directory() | Returns this process builder's working directory. |
| ProcessBuilder | directory(File directory) | Sets this process builder's working directory. |
Get the environment variables
| Return | Method | Summary |
|---|---|---|
| Map<String,String> | environment() | Returns a string map view of this process builder's environment. |
Redirect error stream
| Return | Method | Summary |
|---|---|---|
| boolean | redirectErrorStream() | Tells whether this process builder merges standard error and standard output. |
| ProcessBuilder | redirectErrorStream(boolean redirectErrorStream) | Sets this process builder's redirectErrorStream property. |
Start a new process
| Return | Method | Summary |
|---|---|---|
| Process | start() | Starts a new process using the attributes of this process builder. |
| w_w__w_.___java2_s__.c_o__m___ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |