Package repast.simphony.integration
Class CustomExecute
- java.lang.Object
-
- org.apache.commons.exec.DefaultExecutor
-
- repast.simphony.integration.CustomExecute
-
- All Implemented Interfaces:
org.apache.commons.exec.Executor
public class CustomExecute extends org.apache.commons.exec.DefaultExecutor
An extension oforg.apache.commons.exec.Execute
that adds the ability to retrieve a spanwed process.- Author:
- Jerry Vos
-
-
Constructor Summary
Constructors Constructor Description CustomExecute()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCommandLine(org.apache.commons.exec.CommandLine commandLine)
void
setEnvironment(Map environment)
void
setWorkingDirectory(File wd)
Process
spawnAndReturnProcess()
Starts a process defined by the command line.
-
-
-
Method Detail
-
setWorkingDirectory
public void setWorkingDirectory(File wd)
- Specified by:
setWorkingDirectory
in interfaceorg.apache.commons.exec.Executor
- Overrides:
setWorkingDirectory
in classorg.apache.commons.exec.DefaultExecutor
-
spawnAndReturnProcess
public Process spawnAndReturnProcess() throws IOException
Starts a process defined by the command line. Ant will not wait for this process, nor log its output. This code was taken from the super's spawn method and differs in that it returns the spawn process.- Throws:
IOException
- The exception is thrown, if launching of the subprocess failed
-
setCommandLine
public void setCommandLine(org.apache.commons.exec.CommandLine commandLine)
-
setEnvironment
public void setEnvironment(Map environment)
-
-