be.hogent.tarsos.util
Class Execute

java.lang.Object
  extended by be.hogent.tarsos.util.Execute

public final class Execute
extends java.lang.Object


Method Summary
static int command(java.lang.String command)
          Executes a command and returns the exit value of the process.
static int command(java.lang.String command, java.lang.String redirectOutputToFile)
          Executes a command and returns the exit value of the process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

command

public static int command(java.lang.String command,
                          java.lang.String redirectOutputToFile)
Executes a command and returns the exit value of the process.

Parameters:
command - the command to execute
redirectOutputToFile - redirects the output to this file. Leave empty or set to null when no output file is wanted.
Returns:
the exit value of the process. 0 means everything went OK. Other values depend on the operating system and process.

command

public static int command(java.lang.String command)
Executes a command and returns the exit value of the process. Redirect STDOUT the process to STDOUT of this process.

Parameters:
command - the command to execute
Returns:
the exit value of the process. 0 means everything went OK. Other values depend on the operating system and process.