Forge - Parent 1.2.3-SNAPSHOT

org.jboss.forge.shell.util
Class NativeSystemCall

java.lang.Object
  extended by org.jboss.forge.shell.util.NativeSystemCall

public class NativeSystemCall
extends Object

Executes native system commands.

Author:
Lincoln Baxter, III

Constructor Summary
NativeSystemCall()
           
 
Method Summary
static void exec(boolean wait, String command, String... parms)
          Execute the given system command
static int execFromPath(String command, String[] parms, ShellPrintWriter out, DirectoryResource path)
          Execute a native system command as if it were run from the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeSystemCall

public NativeSystemCall()
Method Detail

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 execute
parms - the command parameters
out - a print writer to which command output will be streamed
path - 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

Forge - Parent 1.2.3-SNAPSHOT

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.