File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes JDK and JRE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JDK and JRE" Watch "JDK and JRE" New topic


Honour Cook

Joined: Nov 01, 2004
Posts: 9
Hello everybody,

I have searched around the difference between JDK and JRE but without much luck. Could you please tell me what the difference between them?

In order to compile and run Java, I know we need JRE, but what the purpose of JDK. I have downloaded j2sdk1.4.2_06 from Sun. After I install it, it created a directory called "j2sdk1.4.2_06" under C:/ drive. Under the Program Files directory, a directory called "Java" which contains a subfolder of "j2sdk1.4.2_06" is also created. Could you please tell me in this case, which one is JRE and which one is JDK? Why do I need both of them. They are quite similar to me.

Thanks for your help.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Have a search of these forums. Someone posted a definition of these two terms only yesterday.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

This is not an advanced topic; moving to the Beginner's forum.

[Jess in Action][AskingGoodQuestions]
Chris Staten
Ranch Hand

Joined: Sep 24, 2004
Posts: 101
Here is a

link to that thread.

The basics are:
JRE == Java Runtime Environment
JDK == Java Developer's Kit
SDK == Software Developer's Kit
JVM == Java Virtual Machine
*JDK and SDK are sometimes interchangeable.

I'm not sure why you have two different directories with the same name (on at the root of C: and the other in Program Files), but it could have to do with multiple installations of the SDK/JDK. I have two different directories (but in the same folder) of jdk1.5.0 and j2sdk1.4.2_06. Someone else might be better for answering that part of your question.
Garrett Reinard

Joined: Dec 10, 2004
Posts: 10
The JRE is used to run java apps... I don't believe the JRE has the javac.exe or other development/compilation executables... It contains exclusively the runtime libraries...

The JDK on the other hand is used for development, and thus contains the development/compilation executables, as well as the runtime executables...

Basically the JRE is a trimmed down version of the JDK for people who need not develop java code but must run java applications...

I agree. Here's the link:
subject: JDK and JRE
It's not a secret anymore!