public class ProcessHelper extends Object
| Constructor and Description |
|---|
ProcessHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Process |
exec(List<String> command)
Executes the specified command in a new process.
|
static Process |
exec(String... command)
Executes the specified command in a new process.
|
static String |
getJavaCommand()
Returns the command to launch java on the current platform.
|
static void |
tryExecJava()
Verifies that java can be executed in a separate process.
|
public static String getJavaCommand()
public static Process exec(String... command) throws IOException
command - the command to executeIOException - if an I/O error occurspublic static Process exec(List<String> command) throws IOException
command - the command to executeIOException - if an I/O error occurspublic static void tryExecJava()
throws IOException
IOException - if java cannot be executedSecurityException - if a security manager exists and doesn't allow creation of a processCopyright © 2001–2025. All rights reserved.