org.jboss.forge.shell.util
Class NativeSystemCall
java.lang.Object
org.jboss.forge.shell.util.NativeSystemCall
public class NativeSystemCall
- extends Object
Executes native system commands.
- Author:
- Lincoln Baxter, III
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeSystemCall
public NativeSystemCall()
execFromPath
public static int execFromPath(String command,
String[] parms,
ShellPrintWriter out,
DirectoryResource path)
throws IOException
- Execute a native system command as if it were run from the given path.
- Parameters:
command
- the system command to executeparms
- the command parametersout
- a print writer to which command output will be streamedpath
- the path from which to execute the command
- Returns:
- 0 on successful completion, any other return code denotes failure
- Throws:
IOException
exec
public static void exec(boolean wait,
String command,
String... parms)
throws IOException
- Execute the given system command
- Throws:
IOException
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.