jProcesses
jProcesses copied to clipboard
getProcessList empty on Windows 8.1
I'm trying to use JProcess.getProcessList() in a Windows 8.1 but the result is empty.
Hi, are you getting any error? Are you using maven? or you have simply downloaded the JAR?
Hi! No, I'm not getting any error, just the result list is empty. Yes I install with maven and gradle.
Randomly I get the same proplem on Windows 7, JProcess.getProcessList() return only one idle process
A very simple test to reproduce. After 30 calls JProcesses.get().fastMode(true).listProcesses() returns only one process.
public static void main(final String[] args) throws InterruptedException {
final StopWatch stopWatch = StopWatch.createStarted();
int nb = 0;
while (true) {
nb++;
final List<ProcessInfo> allProcess = JProcesses.get().fastMode(true).listProcesses();
if (allProcess.size() <= 10) {
System.out.println("After " + nb + " calls");
allProcess.forEach(p -> {
System.out.println("- " + p);
});
break;
} else {
TimeUnit.MILLISECONDS.sleep(300);
}
}
System.out.println(stopWatch.getTime(TimeUnit.SECONDS) + " seconds");
}
Console:
After 30 calls
- PID:0 CPU:null MEM:24 PRIORITY:0 CMD:
96 seconds
p.getName() return System Idle Process
If I launch again, return empty list:
After 1 calls
1 seconds
Hi, I am facing the same issue as well on Windows 10, Are there some plans to fix this?