• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK and JRE

 
Honour Cook
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a search of these forums. Someone posted a definition of these two terms only yesterday.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not an advanced topic; moving to the Beginner's forum.
 
Chris Staten
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic