1 回答
TA贡献1868条经验 获得超4个赞
public Process exec(String[] cmdarray) throws IOException Executes the specified command and arguments in a separate process. The command specified by the tokens in cmdarray is executed as a command in a separate process. This has exactly the same effect as exec(cmdarray, null). If there is a security manager, its checkExec method is called with the first component of the array cmdarray as its argument. This may result in a security exception. Parameters: cmdarray - array containing the command to call and its arguments. Returns: a Process object for managing the subprocess. Throws: SecurityException - if a security manager exists and its checkExec method doesn't allow creation of a subprocess. IOException - if an I/O error occurs NullPointerException - if cmdarray is null IndexOutOfBoundsException - if cmdarray is an empty array (has length 0).
- 1 回答
- 0 关注
- 369 浏览
添加回答
举报