I'm working on a project In which I need to get the old PID of a process back in Windows OS.
Old PID means the PID which was given to a particular process (for example Notepad was given PID 100) before system restarts. Now after restarting system, I need the older PID(100) AND start that process again.
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("C:\\Windows\\notepad.exe");
Here's my example code ,please provide solution if possible or any other way I can get the old PID back and old process back.