• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

jre

 
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 .....
 
(instanceof Sidekick)
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?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • 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!