|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.exec.launcher.CommandLauncherImpl
org.apache.commons.exec.launcher.Java13CommandLauncher
org.apache.commons.exec.launcher.VmsCommandLauncher
public class VmsCommandLauncher
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 Summary | |
|---|---|
VmsCommandLauncher()
|
|
| Method Summary | |
|---|---|
Process |
exec(CommandLine cmd,
Map env)
Launches the given command in a new process. |
Process |
exec(CommandLine cmd,
Map env,
File workingDir)
Launches the given command in a new process, in the given working directory. |
boolean |
isFailure(int exitValue)
Checks whether exitValue signals a failure on the current
system (OS specific). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VmsCommandLauncher()
| Method Detail |
|---|
public Process exec(CommandLine cmd,
Map env)
throws IOException
exec in interface CommandLauncherexec in class CommandLauncherImplcmd - The command to executeenv - The environment for the new process. If null, the environment
of the current process is used.
IOException - if attempting to run a command in a specific directory
public Process exec(CommandLine cmd,
Map env,
File workingDir)
throws IOException
workingDir is null or the logical
JAVA$FORK_SUPPORT_CHDIR needs to be set to TRUE.
exec in interface CommandLauncherexec in class Java13CommandLaunchercmd - the command line to execute as an array of stringsenv - the environment to set as an array of stringsworkingDir - the working directory where the command should run
IOException - probably forwarded from Runtime#execpublic boolean isFailure(int exitValue)
CommandLauncherexitValue signals 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.
isFailure in interface CommandLauncherisFailure in class CommandLauncherImplexitValue - the exit value (return code) to be checked
true if exitValue signals a failureCommandLauncher.isFailure(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||