tags:

views:

378

answers:

3

What's the difference between the JRE included with the JDK (located inside of the jre folder) and the standalone JRE? Is there any?

+4  A: 

There is no difference (unless you have a different version of the JRE). Here is the official definition from SUN/Oracle:

http://java.sun.com/javase/6/docs/technotes/guides/index.html

JRE and JDK Sun Microsystems provides two principal software products in the JavaTM Platform, Standard Edition (JavaTM SE) family:

Java SE Runtime Environment (JRE)

The JRE provides the libraries, Java virtual machine, and other components necessary for you to run applets and applications written in the Java programming language. This runtime environment can be redistributed with applications to make them free-standing.

Java SE Development Kit (JDK)

The JDK includes the JRE plus command-line development tools such as compilers and debuggers that are necessary or useful for developing applets and applications.

-bn

bn
@Kevin, 'bn' is pointing to the fact that there is 'NO' difference between the 'Stand alone JRE' and the 'JRE Included with JDK'(Which is the original question)
Pratik Bhatt
So another quick question is this: can you redistribute the JDK, or can you only provide the JRE?
Dopyiii
+1  A: 

The "JDK" is the Java Development Kit. The JDK is bundle of software that you can use to develop Java based software. The "JRE" is the Java Runtime Environment. The JRE is an implementation of the Java Virtual Machine which actually executes Java programs.

Typically, each JDK contains one (or more) JRE's along with the various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.

Kevin Crowell
+2  A: 

The "standalone JRE" (sometimes also referred to as the "Public JRE") generally does not contain the server version of HotSpot. It also lacks the tools included with the JDK (JavaDB, javac, tools.jar, etc).

Otherwise, the runtimes are identical. Also, note that a JDK may install one (or more) JREs.

Finally, all of the above notes are in regards to Sun's Java installers for Windows. Other vendors and platforms may (and sometimes do) vary.

jsight
IIRC there's more debugging information in the JDK version of the JRE. Check out the size of `rt.jar`. Also there's stuff like autoupdate missing.
Tom Hawtin - tackline
See, I wondered if there was debugging stuff in the JDK's JRE, but people thought I was crazy for mentioning it.
Dopyiii