public class ShellExecutor extends Object
| Constructor and Description |
|---|
ShellExecutor() |
ShellExecutor(Path workingDirectory) |
| Modifier and Type | Method and Description |
|---|---|
int |
executeCommand(String command)
Executes a shell command.
|
int |
executeCommand(String command,
Map<String,String> environment)
Executes a shell command.
|
String |
getWorkingDirectory()
Returns current working directory.
|
public ShellExecutor()
public ShellExecutor(Path workingDirectory)
public String getWorkingDirectory()
public int executeCommand(String command) throws CommandExecutionException
command - Command to executeCommandExecutionException - if an IOException occurs while executing the commandpublic int executeCommand(String command, Map<String,String> environment) throws CommandExecutionException
command - Command to executeenvironment - environment variables to be set before execution of the scriptCommandExecutionException - if an IOException occurs while executing the commandCopyright © 2019 WSO2. All rights reserved.