public class SystemCommand extends Object
Process that executes this native code.| Constructor and Description |
|---|
SystemCommand() |
public int executeCommand(String command, String[] envp, File dir, boolean printOutput) throws IOException, InterruptedException
command - The specified system commandenvp - Array of strings, each element of which has environment
variable settings in the format name=value, or
null if the subprocess should inherit the environment
of the current process.dir - The working directory of the subprocess, or null if
the subprocess should inherit the working directory of the
current process.printOutput - Prints the output of the execution of the commandIOException - If an I/O error occursInterruptedException - if the current thread is interrupted by another thread while
it is waiting, then the wait is ended and an
InterruptedException is thrown.public static void main(String[] args)
args - Copyright © 2015. All rights reserved.