• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JRE and JDK

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am into Java programming since few years but still have a small confusion. JDK has utilities for compiling and executing java programs i.e. javac and java then why we need JRE? Does JRE need to be there for providing JVM only? I have found that JRE interprets byte code into machine specific code and thereby executes them , I understand that the same thing is done by java.exe launcher. ISnt it?
 
Marshal
Posts: 80756
487
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I think you have worked out the answer already.

The JRE is used by applications which simply execute Java programming (Applets on web pages, for example). All the components of the JRE are in the JDK too, but the JDK has compilers etc, so you can use it to create new applications.
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JRE is the Java Runtime Environment. It's everything you need to RUN a java program that has been converted to bytecode.

The JDK is the Java Development Kit. It has everything you need to write, compile and run a java program.

the JRE is effectivly a subset of the JDK.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And JDK also contains a JRE. I guess that is the cause of confusion in your mind. You saw java.exe under JDK's bin?
 
Shailja Sheetal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank yoo all for responding. Yes I found JRE in JDK and JDK too has its own tools for execution of a Java Program, so I thought why is JRE needed. Now I understand that if one has bytecode then one just needs to have JRE on his machine to execute them.Thank you all once again
reply
    Bookmark Topic Watch Topic
  • New Topic