public class SigarProcessManager extends Object implements ProcessManager
ProcessManager implementation that uses the SIGAR library.
Requires the sigar.jar in the classpath and the appropriate system-specific native library (e.g. libsigar-x86-linux.so on Linux x86) available in the java.library.path.
See the SIGAR site for documentation and downloads.
PID_NOT_FOUND, PID_UNKNOWN| 构造器和说明 |
|---|
SigarProcessManager() |
public long findPid(ProcessQuery query) throws IOException
findPid 在接口中 ProcessManagerProcessManager.PID_NOT_FOUND if not,
or ProcessManager.PID_UNKNOWN if this implementation is unable to find outIOExceptionpublic void kill(Process process, long pid) throws IOException
kill 在接口中 ProcessManagerIOExceptionCopyright © 2020. All rights reserved.