What You Should Know About Java Virtual Machine?

Last updated on Nov 27,2019 8.4K Views

What You Should Know About Java Virtual Machine?

edureka.co

Java programming language has been a giant in the IT industry for a very long time. It has some top-notch concepts that make it better than the rest of the programming language. One such concept is the Java virtual machine, in this article, we will learn about the various aspects of Java virtual machine in detail. Following are the topics discussed in this blog:

What is Java Virtual Machine?

Java virtual machine is a platform-independent abstract machine that provides a runtime environment in which the Java byte code is executed.

It is a part of Java runtime environment that converts the Java bytecode into machine-readable language. The main method that we have in a Java program is actually called by the Java virtual machine.

Why Do We Need Java Virtual Machine?

We need the Java virtual machine for the tasks that it performs which are extremely necessary for any development involving Java. Following are a few tasks that Java virtual machine does.

With all these operations, the Java virtual machine is an integral part of Java development. Let’s try to understand how it works with the help of the Java virtual machine architecture.

Java Virtual Machine Architecture

Java virtual machine architecture is pretty simple, it has a memory area, a class loader and an execution engine among other components. let us discuss each of them in detail.

ClassLoader

It is a subsystem that is used to load class files. Whenever we run a program in java, it is first loaded by the ClassLoader. the major function includes initialization, linking and loading. The following are the built-in classloaders in Java.

JVM Memory

Now that we have understood the architecture of the JVM, let’s take a look at the execution process and compilation of code.

Execution Process

The following steps take place while the execution and compilation of a Java code.

Now that we know, how the execution works, let’s take a look at the difference between JDK, JRE, and JVM.

Difference Between JDK, JRE, And JVM

Following are a few important differences between JDK, JVM, and JRE.

  1. JDK stands for Java development kit, and JRE stands for Java runtime environment.
  2. JDK is for development whereas JRE is for the run time environment.
  3. JVM is an essential part of JDK and JRE to run any Java program.
  4. JVM is an integral part of Java programming and provides platform independence.

This brings us to the end of this article where we have learned about the Java virtual machine in detail. I hope you are clear with all that has been shared with you in this tutorial.

If you found this article on “Java Virtual Machine” relevant, check out the Edureka Java Certification Training, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe.

We are here to help you with every step on your journey and come up with a curriculum that is designed for students and professionals who want to be a Java Developer. The course is designed to give you a head start into Java programming and train you for both core and advanced Java concepts along with various Java frameworks like Hibernate & Spring.

If you come across any questions, feel free to ask all your questions in the comments section of “Java Virtual Machine” and our team will be glad to answer.

Upcoming Batches For Java Course Online
Course NameDateDetails
Java Course Online

Class Starts on 7th December,2024

7th December

SAT&SUN (Weekend Batch)
View Details
BROWSE COURSES