public class Shell extends Object implements Cloneable
Class that abstracts the Shell functionality, with subclases for shells that behave particularly, like
command.comcmd.exe| Constructor and Description | 
|---|
| Shell() | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | clone() | 
| String | getExecutable() | 
| List<String> | getShellCommandLine(String... arguments)Get the full command line to execute, including shell command, shell arguments,
 executable and executable arguments | 
| File | getWorkingDirectory() | 
| protected boolean | isDoubleQuotedArgumentEscaped() | 
| protected boolean | isSingleQuotedArgumentEscaped() | 
| void | setExecutable(String executable)Sets the executable to run. | 
| void | setQuotedArgumentsEnabled(boolean quotedArgumentsEnabled) | 
| void | setWorkingDirectory(File workingDirectory)Sets execution directory. | 
| void | setWorkingDirectory(String path)Sets execution directory. | 
protected boolean isDoubleQuotedArgumentEscaped()
protected boolean isSingleQuotedArgumentEscaped()
singleQuotedArgumentEscapedpublic List<String> getShellCommandLine(String... arguments)
arguments - arguments for the executable, not the shellpublic void setQuotedArgumentsEnabled(boolean quotedArgumentsEnabled)
quotedArgumentsEnabled - quotedArgumentsEnabledpublic void setExecutable(String executable)
executable - The executable.public String getExecutable()
public void setWorkingDirectory(String path)
path - The path which should be used as working directory.public void setWorkingDirectory(File workingDirectory)
workingDirectory - The working directory.public File getWorkingDirectory()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.