What are the differences between private jre and public jre? Is there some official paper about this topic?
I didn\'t find any question on SO about this topic. Nor I was
The answer is very simple: the public JRE is the one users will use if they want to run anything Java. The private JRE is a different installation that one can use, if the explicitly execute that Java binary (e.g. on Windows: "C:\Programs\Java\MyJava\bin\java.exe").
The official answer, from Oracle:
Private Versus Public JRE
Installing the JDK also installs a private JRE and optionally a public copy. The private JRE is required to run the tools included with the JDK. It has no registry settings and is contained entirely in a jre directory (typically at C:\Program Files\jdk1.8.0\jre) whose location is known only to the JDK. On the other hand, the public JRE can be used by other Java applications, is contained outside the JDK (typically at C:\Program Files\Java\jre1.8.0), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft), can be removed using Add/Remove Programs, might be registered with browsers, and might have the java.exe file copied to the Windows system directory (which would make it the default system Java platform).
Private JRE ->Private JRE is Used for compilation of Java Application when both Public and private JRE is available and its installation location is defined by user.
Public JRE -> Public JRE is used for Execution of Java Application when both Public and private JRE is available....if in case Private JRE is not available then both Compilation and Execution process will be done by Public JRE.
A JRE is nothing but a folder that contains JVM executables, setting files, required lib files, and extensions. You can install multiple JREs on your system Sun generally installs versions in C:\Program Files\Java as jre eg.jre1.6.0_06.
A Public JRE is available to all Java programs, Browsers, and the libs in this JRE folder are available to applications started in command line like java com.sarathonline.cli.HelloWorld This JRE is also registered in path, and Browser plugin.
A Private JRE is something that is installed in the system but is not referred to by default. This could be a copy of the JRE / JDK folder from another installed directory. If you see a my earlier post: starting eclipse with jre 1.6 where your environment is in 1.4, The JRE1.6 is used only by Eclipse, this is a private JRE. While the JAVA_HOME points to 1.4. This is a public JRE.
Source:
http://blog.sarathonline.com/2008/07/public-and-private-jre.html
Some more discussion on the topic:
http://www.velocityreviews.com/forums/t649860-private-vs-public-jre-in-different-oss.html