Monday 17 September 2012

JDK 6; public Vs private JRE


JDK 6; public Vs private JRE


While installing JDK6, I found that there is a JRE named “public JRE”. I don’t know what is the difference between a public JRE and a private JRE. I googled and here are the search results :
From here,
In windows, a private JRE is installed in the JDK folder (for use by the tools – javac, etc) when you install the JDK. For current JDK versions, you are given the option to install a public JRE that is used to run java programs (in earlier versions this was not optional, it installed automatically). The public JRE installation uses Registry entries; the private one doesn’t.
From here,
In the private JRE (“C:\Programme\Java\jdk1.5.0\jre\” on my system)
the class files were compiled *with* debugging info (SourceFile,
LineNumberTable, …). This JRE is meant to be used for developing,
because you can step through the JRE code with debuggers, and get
exception stack traces with line numbers.
In the public JRE (“C:\Programme\Java\jre1.5.0\” on my system)
the class files were compiled *without* debugging info. This JRE is
meant to be installed on customers’ systems.


Private vs. public JRE – Installing the JDK installs a private Java SE Runtime Environment (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.6.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.6.0), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft), can be removed using Add/Remove Programs, might or might not be registered with browsers, and might or might not have java.exe copied to the Windows system directory (making it the default system Java platform or not). 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...