Answer the question
In order to leave comments, you need to log in
How to connect ProcessInfo in Java?
I decided to start learning Java, I need to work with processes, I googled and found some convenient code:
List <ProcessesInfo> processesList = JProcesses.getProcessList();
for (final ProcessesInfo processInfo : processesList) {
System.out.println("Process PID: " + processInfo.getPid());
System.out.println("Process Name: " + processInfo.getName());
System.out.println("Process Used Time: " + processInfo.getTime());
System.out.println("------------------");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question