@Deprecated public interface ProcessBuilderImplementation
ProcessBuilder
.
Although it is not required it is reasonable to have implementation of this
interface stateless. In such case instances of ProcessBuilder
using it will be thread safe.
ProcessBuilder
Modifier and Type | Method and Description |
---|---|
Process |
createProcess(String executable,
String workingDirectory,
List<String> arguments,
List<String> paths,
Map<String,String> environment,
boolean redirectErrorStream)
Deprecated.
Creates a process using the specified parameters and environment
configuration.
|
@NonNull Process createProcess(@NonNull String executable, @NullAllowed String workingDirectory, @NonNull List<String> arguments, @NonNull List<String> paths, @NonNull Map<String,String> environment, boolean redirectErrorStream) throws IOException
executable
- the name of the executable to runworkingDirectory
- the working directory of the created process or
null
as implementation specific defaultarguments
- the arguments passed to the processpaths
- the additional paths to add to PATH
environment
variableenvironment
- environment variables to configure for the processredirectErrorStream
- when true
the error stream of
the process should be redirected to standard output streamIOException
- IOException if the process could not be createdUserQuestionException
- in case there is a need to interact with
user, don't be afraid to throw a subclass of
UserQuestionException
with overriden UserQuestionException.confirmed()
method.