530 |
* entries |
* entries |
531 |
* @throws IndexOutOfBoundsException if cmd is length 0 |
* @throws IndexOutOfBoundsException if cmd is length 0 |
532 |
* @since 1.3 |
* @since 1.3 |
|
* @XXX Ignores dir, for now |
|
533 |
*/ |
*/ |
534 |
public Process exec(String[] cmd, String[] env, File dir) |
public Process exec(String[] cmd, String[] env, File dir) |
535 |
throws IOException |
throws IOException |
537 |
SecurityManager sm = securityManager; // Be thread-safe! |
SecurityManager sm = securityManager; // Be thread-safe! |
538 |
if (sm != null) |
if (sm != null) |
539 |
sm.checkExec(cmd[0]); |
sm.checkExec(cmd[0]); |
540 |
//XXX Should be: return execInternal(cmd, env, dir); |
return execInternal(cmd, env, dir); |
|
return execInternal(cmd, env); |
|
541 |
} |
} |
542 |
|
|
543 |
/** |
/** |
743 |
* use the current working directory; otherwise start the process in that |
* use the current working directory; otherwise start the process in that |
744 |
* directory. If env is null, then the new process should inherit |
* directory. If env is null, then the new process should inherit |
745 |
* the environment of this process. |
* the environment of this process. |
|
* XXX Add directory support. |
|
746 |
* |
* |
747 |
* @param cmd the non-null command tokens |
* @param cmd the non-null command tokens |
748 |
* @param env the environment setup |
* @param env the environment setup |
750 |
* @return the newly created process |
* @return the newly created process |
751 |
* @throws NullPointerException if cmd or env have null elements |
* @throws NullPointerException if cmd or env have null elements |
752 |
*/ |
*/ |
753 |
// native Process execInternal(String[] cmd, String[] env, File dir); |
native Process execInternal(String[] cmd, String[] env, File dir); |
|
native Process execInternal(String[] cmd, String[] env); |
|
754 |
|
|
755 |
/** |
/** |
756 |
* Get the system properties. This is done here, instead of in System, |
* Get the system properties. This is done here, instead of in System, |