接口 CommandLauncher
- 所有已知实现类:
CommandLauncherImpl,CommandLauncherProxy,Java13CommandLauncher,OS2CommandLauncher,VmsCommandLauncher,WinNTCommandLauncher
public interface CommandLauncher
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
方法概要
修饰符和类型方法说明exec(CommandLine cmd, Map env) Launches the given command in a new process.exec(CommandLine cmd, Map env, File workingDir) Launches the given command in a new process, in the given working directory.booleanisFailure(int exitValue) Checks whetherexitValuesignals a failure on the current system (OS specific).
-
方法详细资料
-
exec
Launches the given command in a new process.- 参数:
cmd- The command to executeenv- The environment for the new process. If null, the environment of the current process is used.- 返回:
- the newly created process
- 抛出:
IOException- if attempting to run a command in a specific directory
-
exec
Launches the given command in a new process, in the given working directory.- 参数:
cmd- The command to executeenv- 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- 返回:
- the newly created process
- 抛出:
IOException- if trying to change directory
-
isFailure
boolean isFailure(int exitValue) Checks 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.
- 参数:
exitValue- the exit value (return code) to be checked- 返回:
trueifexitValuesignals a failure
-