public class ShellUtils extends Object
| 构造器和说明 |
|---|
ShellUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ProcessBuilder |
createProcessBuilder(String cmd) |
static BufferedReader |
executeShell(String cmd) |
static BufferedReader |
executeShell(String cmd,
long timeout) |
static long |
getPidOfProcess(Process p) |
static void |
killProcess(long pid) |
public static ProcessBuilder createProcessBuilder(String cmd)
public static BufferedReader executeShell(String cmd) throws IOException
IOExceptionpublic static BufferedReader executeShell(String cmd, long timeout) throws IOException
IOExceptionpublic static long getPidOfProcess(Process p)
public static void killProcess(long pid)
throws IOException
IOExceptionCopyright © 2018. All rights reserved.