com.jstatcom.engine
Class SysRun

java.lang.Object
  extended by com.jstatcom.engine.SysRun

public final class SysRun
extends java.lang.Object

Helper class to invoke system commands via static methods.

Author:
Markus Kraetzig

Constructor Summary
SysRun()
           
 
Method Summary
static void invoke(java.lang.String command, java.lang.String arg)
          Creates a new process with an argument and returns immediately.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SysRun

public SysRun()
Method Detail

invoke

public static void invoke(java.lang.String command,
                          java.lang.String arg)
Creates a new process with an argument and returns immediately. This method could for example be used to call a viewer with a file argument. The viewer should be installed on the system.

Parameters:
command - name of the executable to run
arg - argument for the process to create
Throws:
java.lang.IllegalArgumentException - if (command == null || command.length() == 0)
java.lang.RuntimeException - if an execute failed due to an IOException