8055330: (process spec) ProcessBuilder.start and Runtime.exec should throw UnsupportedOperationException on platforms that don't support
Clarify optional behavior and the exception thrown when not supported Reviewed-by: dfuchs, martin
This commit is contained in:
parent
2a8d5c46e1
commit
0854df7b86
jdk/src/java.base/share/classes/java/lang
@ -951,6 +951,9 @@ public final class ProcessBuilder
|
||||
* {@code command} array as its argument. This may result in
|
||||
* a {@link SecurityException} being thrown.
|
||||
*
|
||||
* <p>If the operating system does not support the creation of
|
||||
* processes, an {@link UnsupportedOperationException} will be thrown.
|
||||
*
|
||||
* <p>Starting an operating system process is highly system-dependent.
|
||||
* Among the many things that can go wrong are:
|
||||
* <ul>
|
||||
@ -998,6 +1001,9 @@ public final class ProcessBuilder
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* @throws UnsupportedOperationException
|
||||
* If the operating system does not support the creation of processes.
|
||||
*
|
||||
* @throws IOException if an I/O error occurs
|
||||
*
|
||||
* @see Runtime#exec(String[], String[], java.io.File)
|
||||
|
@ -564,6 +564,9 @@ public class Runtime {
|
||||
* <code>cmdarray</code> as its argument. This may result in a
|
||||
* {@link SecurityException} being thrown.
|
||||
*
|
||||
* <p>If the operating system does not support the creation of
|
||||
* processes, an {@link UnsupportedOperationException} will be thrown.
|
||||
*
|
||||
* <p>Starting an operating system process is highly system-dependent.
|
||||
* Among the many things that can go wrong are:
|
||||
* <ul>
|
||||
@ -597,6 +600,9 @@ public class Runtime {
|
||||
* {@link SecurityManager#checkExec checkExec}
|
||||
* method doesn't allow creation of the subprocess
|
||||
*
|
||||
* @throws UnsupportedOperationException
|
||||
* If the operating system does not support the creation of processes.
|
||||
*
|
||||
* @throws IOException
|
||||
* If an I/O error occurs
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user