• Home
  • About
  • Contact
  • Privacy Policy
  • Home
  • About
  • Contact
  • Privacy Policy

code with zaheer

  • java
  • difference between JDK,JRE and JVM

difference between JDK,JRE and JVM

Posted on August 13, 2022
codewithzaheer

About JDK, JVM and JRE

for learn java programming we required JDK

JDK

JDKthat is java development kit used for compiling java programs or debugging etc... it consists of compiler and other tools along with JRE

Once we compiled the program we need to execute it for that we need JREjava runtime environment which is the part of jdk.

JRE it contains class libraries along with JVM.

JVM it is java virtual machine, its a part of JRE.

you can imagine like JDK is for developing and JRE for executing and for executing we required JVM which is the part of the JRE.

JVM will execute the programs

How the program gets executed means

Example:

HelloWorld.java it is a our program file.

Now, we will compile the file using the command javac HelloWorld.java

note: javac is a part of JDK, aftering compiling the program file we get the .class i.e HelloWorld.class

Now, for running this .class file i.e HelloWorld.class we have the command java HelloWorld, helloworld is the file name.

java command is nothing but jvm which is the part of JRE therefore JDK will compile and JRE will execute the program.



No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Popular Posts

  • python syllabus
  • A Deep Dive into Angular modules
  • Guide to testing your local website on mobile devices: Simple steps for developers

Quick Links

  • Home
  • About
  • Contact
  • Privacy Policy

Follow us on

This website is developed by Zaheer Introvert © 2021