tags:

views:

353

answers:

3

i know that the JDK consists of all java packages .But what does the JRE consist of apart from java.exe ? I could understand the necessities of things in 'bin' folder in the JRE but what about the 'lib' folder ?

A: 

The rest of it has the runtime support including standard class libraries.

frankodwyer
what do you mean by "standard class libraries" - you mean the same thing that is in the java packages in jdk ?
arshad
yes, although there may be some differences as not all of those may be required at runtime. if you install the jre you will see it is missing the compiler etc, vs the jdk.
frankodwyer
but i searched the entire folders of JRE but couldnt find any source code for java packages as that found in JDK .
arshad
not the source code, the jar files.
frankodwyer
oh so the jar files contain all the class files for java packages found in the sdk.isnt it frank ? thanks a lot for your patient answers pal.
arshad
i think this is what you meant - "rt.jar" -- the bootstrap classes (the RunTime classes that comprise the Java platform's core API
arshad
+6  A: 

Have a look at this JDK and JRE File Structure document from Sun's JDK documentation.

It specifically says the following about the lib directory:

Code libraries, property settings, and resource files used by the Java runtime environment. For example:

  • rt.jar -- the bootstrap classes (the RunTime classes that comprise the Java platform's core API).
  • charsets.jar -- character conversion classes.

Aside from the ext subdirectory (described below) there are several additional resource subdirectories not described here.

Simon Lieschke
beat me by 17 seconds ;)
Yuval A
+2  A: 

JRE is composed of the JVM which is the runtime interpreter for the Java language, the Class Loader, Secure Execution Implementation classes, Java APIs(core classes, SE classes) and the Java Web (Deployment) foundation which includes Java Web Start.

The lib part of JRE is Java's Library containing classes that lay the foundation for features like JavaBeans Components(JBCL) and Generic Collections(GCL).

Lonzo
I think you meant "The JVM is composed the the JRE", which is more accurate.
Mike Reedell