public class NativeShell extends Shell
| Constructor and Description |
|---|
NativeShell() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
invokeExecutable(java.lang.String commandline)
Executes the given command on the commandline and returns the complete output.
|
static java.lang.String |
invokeExecutable(java.lang.String commandline,
long maxLines) |
static java.lang.String |
invokeExecutable(java.lang.String commandline,
long maxLines,
boolean suppressErrors)
Executes the given command on the commandline and returns the output up to a given number of lines.
|
java.lang.String |
run(java.lang.String cmd)
runs command
|
getCygwinShell, getNativeShellpublic java.lang.String run(java.lang.String cmd)
throws java.lang.InterruptedException,
java.io.IOException
Shellpublic static java.lang.String invokeExecutable(java.lang.String commandline)
throws java.io.IOException,
java.lang.InterruptedException
commandline - some commandjava.io.IOException - of an error was encountered.java.lang.InterruptedExceptionpublic static java.lang.String invokeExecutable(java.lang.String commandline,
long maxLines)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic static java.lang.String invokeExecutable(java.lang.String commandline,
long maxLines,
boolean suppressErrors)
throws java.io.IOException,
java.lang.InterruptedException
commandline - some commandmaxLines - the maximum number of lines to be read (the process is killed afterwards)java.io.IOException - of an error was encountered.java.lang.InterruptedException