public abstract class CommandLauncherImpl extends Object implements CommandLauncher
|Constructor and Description|
|Modifier and Type||Method and Description|
Launches the given command in a new process.
Launches the given command in a new process, in the given working directory.
public Process exec(CommandLine cmd, Map env) throws IOException
public abstract Process exec(CommandLine cmd, Map env, File workingDir) throws IOException
cmd- The command to execute
env- The environment for the new process. If null, the environment of the current process is used.
workingDir- The directory to start the command in. If null, the current directory is used
IOException- if trying to change directory
public boolean isFailure(int exitValue)
exitValuesignals a failure on the current system (OS specific).
Note that this method relies on the conventions of the OS, it will return false results if the application you are running doesn't follow these conventions. One notable exception is the Java VM provided by HP for OpenVMS - it will return 0 if successful (like on any other platform), but this signals a failure on OpenVMS. So if you execute a new Java VM on OpenVMS, you cannot trust this method.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.