• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDK and JRE

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a search of these forums. Someone posted a definition of these two terms only yesterday.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not an advanced topic; moving to the Beginner's forum.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic