Public JRE vs Private
JRE
Private
JRE comes along with application that depends on JRE to run, example if you
install Oracle database or WebLogic server it comes with its own copies of JRE
bundled with it, even our JDK setup will comes with its own private JRE version.
Why we need private
JRE to be bundled with our application
Assume
you had developed an application that uses JRE 8 version, if someone tries to
install your application on system that has public JRE 7, then your application
fails to run due to incompatible or lower version interpreter.
Also
upgrading public JRE may impact existing application running on your machine.
Is it possible to set
private JRE as public JRE that comes with JDK?
Yes, it
is possible to use any private JRE as Public JRE, simple set the path to JRE
bin and JRE_HOME that are available inside JDK folder, but when we are uninstalling
the JDK its private JRE also get removed.
So it's
better to install a fresh public JRE for common purpose.