Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is difference between JDK, JRE and JVM?

 
Minal Silimkar-Urankar
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To compile the java program we requires compiler.
In jdk, we have javac.exe, which is responsible for compilation of the program, which generates bytecode (.class file) .

To run the bytecode (.class file), we require java run time environment JRE, which is given by java.exe. In jdk as well as in jre we have java.exe.

javac.exe and java.exe both launches the jvm for compilation as well as to run the program?
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your understanding is correct except

javac.exe and java.exe both launches the jvm for compilation as well as to run the program?


javac.exe doens't launch the jvm, only java.exe does.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javac.exe doens't launch the jvm

The Java compiler is written in Java, so, yes, javac.exe lanuches a JVM.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See question and answer #18 in our Java Beginners FAQ.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic