public class ProcessUtil extends Object
| Constructor and Description |
|---|
ProcessUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
execute(File dir,
String... commandAndArgs)
Execute a CLI command using ProcessBuilder.
|
public static String execute(File dir, String... commandAndArgs) throws IOException, InterruptedException
dir - Directory where execute the command.commandAndArgs - Command and parameters of the command.IOException - If an error occur accessing files.InterruptedException - If the command is interrupted.Copyright © 2016–2022. All rights reserved.