In order to avoid a reboot or occurrence of a pop-up which requests to reboot the OS if a newer version of Java will be installed silently, all processes which are using Java have to be killed.
Just killing java.exe by executing the following command:
taskkill /im java.exe /f
does not solve the issue as some processes will continue to use java, e.g. postgresql JDBC, webbrowsers, tomcat, eclipse.
If all processes which are using Java are killed before Java will be installed silently, the OS will not be rebooted.
The approach to kill processes individually which are using java is not a persistent solution as if another program will be installed in the future which will use java and not be killed, the system will be rebooted again if java will be installed silently.
How to find all processes which are using java and kill them all to avoid OS will be rebooted or a pop up will occur which requests to reboot the system if Java will be installed silently?