Java-105: Java definitions which I often confuse!

Saurabh Kumar
2 min readMay 29, 2022

straightaway to the questions !

Is Java compiled vs Interpreted?

JDK compiles java source code (*.java files) into bytecode (*.class files) and then finally interprets by JVM to machine code. Can't really put it in one category?

What is JRE?

JRE provides a Java class loader, class libraries, Java Virtual Machine (JVM), and GC . which creates an environment required to run java applications.

JVM = (GC + JIT + execution engine) *
JDK = JVM + class library + class loader
JRE = JDK + source code compiler + debugger

What is JDK?

JDK in short is a tool that takes your java source code and converts them into a format (bytecode) for interpretation by JVM

What is JVM?

The class loader will load the bytecode into the JVM and link them with the class libraries provided by the JRE.
JVM interprets bytecode (*.class files) to machine code (0101* binary files) given to the microprocessor to execute.

  1. Text file with java code
  2. Compiler converts the java text file to *.java file, fails if any compile time error happens.
  3. Processing by JDK into the *.class file
  4. Class loaders will load *.class files to the JVM and link it up with the JRE
  5. Then JVM picks up these *.class files and converts them into machine code and gives them to the bare metal to execute.
pathetic programmers art ^

leave me a clap if you found this article insightful 😄, Happy Reading !

--

--