• Post Reply Bookmark Topic Watch Topic
  • New Topic

jre  RSS feed

 
himanshu gurha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the role of the JRE?I am not clear with the architecture of java that is jre & jvm ie, which one is dependent on which .....
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM is a component that interprets Java byte code and runs the appropriate native instructions. Most JVMs now can also compile byte code to native code and execute the compiled code. They choose the parts of the program most likely to yield performance gains, usually things that are repeated a lot. You start the JVM with the "java" command on the command line.

The JRE is the JVM plus a bunch of supporting libraries and native modules for the platform, eg DLLs on Windows. You need the whole JRE to run programs.

The JDK or SDK is the JRE plus all the development tools such as the compiler, JavaDoc and many other things you may or may not ever need.

Does that answer match your question?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16047
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JVM = Java Virtual Machine
JRE = Java Runtime Environment

The JVM executes your program, and the JRE is the environment around the JVM that's needed to run your program (the standard Java library, etc.).

You can think of it like this: the JVM is the engine, and the JRE is the complete car including the engine. To be able to drive, you need the complete car, not only the engine.

For more information, see About the Java Technology in The Java Tutorial.

(By the way, this question doesn't really belong in the Advanced forum).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!