src/share/classes/java/lang/ProcessBuilder.java
Print this page
*** 1009,1036 ****
if (arg == null)
throw new NullPointerException();
// Throws IndexOutOfBoundsException if command is empty
String prog = cmdarray[0];
- SecurityManager security = System.getSecurityManager();
- if (security != null)
- security.checkExec(prog);
-
String dir = directory == null ? null : directory.toString();
- try {
return ProcessImpl.start(cmdarray,
environment,
dir,
redirects,
redirectErrorStream);
- } catch (IOException e) {
- // It's much easier for us to create a high-quality error
- // message than the low-level C code which found the problem.
- throw new IOException(
- "Cannot run program \"" + prog + "\""
- + (dir == null ? "" : " (in directory \"" + dir + "\")")
- + ": " + e.getMessage(),
- e);
}
- }
}
--- 1009,1022 ----