public class NativeShell extends Shell
| Modifier and Type | Method and Description |
|---|---|
static String |
invokeExecutable(String commandline)
Executes the given command on the commandline and returns the complete output.
|
static String |
invokeExecutable(String commandline,
long maxLines) |
static String |
invokeExecutable(String commandline,
long maxLines,
boolean suppressErrors)
Executes the given command on the commandline and returns the output up to a given number of lines.
|
String |
run(String cmd)
runs command
|
getCygwinShell, getNativeShellpublic String run(String cmd) throws InterruptedException, IOException
Shellrun in class Shellcmd - the command to be runInterruptedExceptionIOExceptionpublic static String invokeExecutable(String commandline) throws IOException, InterruptedException
commandline - some commandIOException - of an error was encountered.InterruptedExceptionpublic static String invokeExecutable(String commandline, long maxLines) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static String invokeExecutable(String commandline, long maxLines, boolean suppressErrors) throws IOException, InterruptedException
commandline - some commandmaxLines - the maximum number of lines to be read (the process is killed afterwards)IOException - of an error was encountered.InterruptedExceptionCopyright © 2018. All rights reserved.