What are JDK, JRE, JVM, and javac?

Meanings?

  • JDK stands for Java Development Kit
  • JRE stands for Java Runtime Environment
  • JVM stands for Java Virtual Machine
  • And javac is used to compile a Java program

JDK?

  • JDK stands for Java Development Kit
  • JDK provides all the necessary tools to work with the .java file
  • JDK -> JRE, JVM

JRE?

  • We need to run the compiled code of Java
  • abc.class file needs to be converted in m/c instructions
  • JRE = JVM + Java Packages Classes (like util, math, lang, awt, swing, etc) + runtime libraries. (JRE = JVM + rt.jar)

JVM?

  • The Java Virtual Machine (JVM) is an abstract machine that provides a runtime environment for executing Java bytecode. It first converts the bytecode into machine code instructions, which are then executed by the CPU.
  • It converts Java bytecode into machine language instructions.

javac?

  • javac is required to compile a Java program.
  • It generates byte code from a Java file.
  • This byte code file is written in bytes which independently works on all types of JVM machines.
> javac SampleProgram.java
> java SampleProgram

2 Comments.

  1. Firstly sir, your teaching is the best. Everything you teach is to the point and valuable. I am doing DSA with java which I am finding fun to do, all thanks to you java looks the simplest language. Just wanted you to come up with a video about the scope of java in technical industry…like what all profession you can be in…. through java…I hope for your reply.

Leave a Reply to Akash Chauhan Cancel reply

Your email address will not be published. Required fields are marked *