tags:

views:

70

answers:

4

What I noticed is that rt.jar's size is different between JRE and JDK. It is bigger in JDK. Why is it so?

+2  A: 

The JDK includes among others also the implementation of the javax.tools API which gives programmatic access to the compiler. If you're curious for more, just extract the JAR using some ZIP tool and compare the contents.

BalusC
Looks like `javax.tools` is in both JRE and JDK `rt.jar`s
Tom Hawtin - tackline
@Tom: The interface, yes, but not the implementation. I'll clarify the answer.
BalusC
@BalusC the implementation will be in `tools.jar`, I believe.
Tom Hawtin - tackline
Oh you're right, @AndroidNoob: please unaccept this answer so that I can delete it. It's in essence wrong.
BalusC
A: 

There are more files in the JDK version, compared to the JRE version.

MikeG
A: 

The JDK simply contains more classes and resources. For instance, more character sets are supported.

Thorbjørn Ravn Andersen
+3  A: 

IIRC, primarily the JDK version contains more debug information.

There appears to be the same number of files in both:

C:\Program Files\Java>jdk1.6.0_21\bin\jar.exe tf jdk1.6.0_21\jre\lib\rt.jar | wc -l
17036

C:\Program Files\Java>jdk1.6.0_21\bin\jar.exe tf jre6\lib\rt.jar | wc -l
17036
Tom Hawtin - tackline