This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JDK and JRE" Watch "JDK and JRE" New topic
Author

JDK and JRE

Honour Cook
Greenhorn

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.
Honour
Paul Sturrock
Bartender

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
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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
Greenhorn

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...

-Garrett
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDK and JRE
 
Similar Threads
Installation Query
Java versions?
jdk, sdk, jre...
JRE AND JVM
Question on JRE