Class JvmCommandRunner
java.lang.Object
org.springframework.batch.core.step.tasklet.JvmCommandRunner
- All Implemented Interfaces:
CommandRunner
Implementation of the
CommandRunner
interface that calls the standard
Runtime.exec(java.lang.String)
method. It should be noted that there is no unit tests for this
class, since there is only one line of actual code, that would only be testable by
mocking Runtime
.- Since:
- 5.0
- Author:
- Stefano Cordio, Mahmoud Ben Hassine
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
JvmCommandRunner
public JvmCommandRunner()
-
-
Method Details
-
exec
Delegate call toRuntime.exec(java.lang.String)
with the arguments provided.- Specified by:
exec
in interfaceCommandRunner
- Parameters:
command
- a specified system command and its arguments.envp
- array of strings, each element of which has environment variable settings in the format name=value, ornull
if the subprocess should inherit the environment of the current process.dir
- the working directory of the subprocess, ornull
if the subprocess should inherit the working directory of the current process.- Returns:
- A new
Process
object for managing the subprocess - Throws:
IOException
- If an I/O error occurs- See Also:
-