Package org.apache.commons.exec.launcher
Class VmsCommandLauncher
java.lang.Object
org.apache.commons.exec.launcher.CommandLauncherImpl
org.apache.commons.exec.launcher.Java13CommandLauncher
org.apache.commons.exec.launcher.VmsCommandLauncher
- All Implemented Interfaces:
- CommandLauncher
A command launcher for VMS that writes the command to a temporary DCL script before launching commands. This is due to limitations of both the DCL
 interpreter and the Java VM implementation.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionexec(CommandLine cmd, Map<String, String> env) Launches the given command in a new process.Launches the given command in a new process, in the given working directory.booleanisFailure(int exitValue) Tests whetherexitValuesignals a failure on the current system (OS specific).Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.exec.launcher.CommandLauncherexec
- 
Constructor Details- 
VmsCommandLauncherpublic VmsCommandLauncher()Constructs a new instance.
 
- 
- 
Method Details- 
execLaunches the given command in a new process.- Specified by:
- execin interface- CommandLauncher
- Overrides:
- execin class- CommandLauncherImpl
- Parameters:
- cmd- The command to execute.
- env- The environment for the new process. If null, the environment of the current process is used.
- Returns:
- the newly created process.
- Throws:
- IOException- if attempting to run a command in a specific directory.
 
- 
execLaunches the given command in a new process, in the given working directory. Note that under Java 1.3.1, 1.4.0 and 1.4.1 on VMS this method only works ifworkingDiris null or the logical JAVA$FORK_SUPPORT_CHDIR needs to be set to TRUE.- Specified by:
- execin interface- CommandLauncher
- Overrides:
- execin class- Java13CommandLauncher
- Parameters:
- cmd- the command line to execute as an array of strings.
- env- the environment to set as an array of strings.
- workingDir- the working directory where the command should run.
- Returns:
- the newly created process.
- Throws:
- IOException- probably forwarded from- Runtime.exec(String[], String[], File).
 
- 
isFailureDescription copied from interface:CommandLauncherTests whetherexitValuesignals 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. - Specified by:
- isFailurein interface- CommandLauncher
- Overrides:
- isFailurein class- CommandLauncherImpl
- Parameters:
- exitValue- the exit value (return code) to be checked.
- Returns:
- trueif- exitValuesignals a failure.
- See Also:
 
 
-