public class VmsCommandLauncher extends Java13CommandLauncher
构造器和说明 |
---|
VmsCommandLauncher() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Process |
exec(CommandLine cmd,
java.util.Map env)
Launches the given command in a new process.
|
java.lang.Process |
exec(CommandLine cmd,
java.util.Map env,
java.io.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). |
public java.lang.Process exec(CommandLine cmd, java.util.Map env) throws java.io.IOException
exec
在接口中 CommandLauncher
exec
在类中 CommandLauncherImpl
cmd
- The command to executeenv
- The environment for the new process. If null, the environment
of the current process is used.java.io.IOException
- if attempting to run a command in a specific directorypublic java.lang.Process exec(CommandLine cmd, java.util.Map env, java.io.File workingDir) throws java.io.IOException
workingDir
is null or the logical
JAVA$FORK_SUPPORT_CHDIR needs to be set to TRUE.exec
在接口中 CommandLauncher
exec
在类中 Java13CommandLauncher
cmd
- 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 runjava.io.IOException
- probably forwarded from Runtime#execpublic boolean isFailure(int exitValue)
CommandLauncher
exitValue
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
在接口中 CommandLauncher
isFailure
在类中 CommandLauncherImpl
exitValue
- the exit value (return code) to be checkedtrue
if exitValue
signals a failureCommandLauncher.isFailure(int)