From: Markus Michel <nemocadneza@go...> - 2009-06-27 08:27:21
After browsing through the example code I still don't understand how to get the PID of an running process (in my case: the pid of the java process). I already tried to use the ProcessFinder class:
ProcessFinder pf = new ProcessFinder(sigar);
long pids = null;
pids = pf.find("java");
and the Shell class:
pids = shell.findPids("java");
But in both cases am getting an exception. Does somebody has an idea how to get the PID?