public class Exec extends Object
| Constructor and Description |
|---|
Exec() |
| 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)
Executes the given command on the commandline and returns the output up to a given number of lines.
|
public 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
commandline - some commandmaxLines - the maximum number of lines to be read (the process is killed afterwards)IOException - of an error was encountered.InterruptedExceptionCopyright © 2016. All rights reserved.