In this tutorial, we will learn about JDK( Java Development Kit ), JRE( Java Runtime Environment ), and JVM (Java Virtual Machine).
The Java Virtual Machine (JVM) is the process that executes Java code, and the Java Runtime Environment (JRE) is the collection of files that make up the “environment” in which the JVM runs. JRE is a Java runtime environment that allows you to run any Java program locally.
- JDK, JRE, and JVM are core concepts of the Java programming language. We don’t use these concepts in programming. However, as Java developers, we should be aware of them.
What is JDK (Java Development Kit)?
The Java Development Kit (JDK) is a software development kit that is required to create Java applications. JDK and JRE are both downloaded when you download JDK.
- To complete the development of a Java application, the JDK contains a private Java Virtual Machine (JVM) and a few other resources such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), and so on.
- Because JDK is platform-specific software, we have installers for Windows, Mac OS X, and Unix systems.
- JDK can be considered a superset of JRE because it includes JRE along with the Java compiler, debugger, and core classes.
What is JVM ( Java Virtual Machine)?
The JVM (Java Virtual Machine) is an abstract machine that allows you to run Java programs on your computer.
JVM (Java Virtual Machine) is a machine that is abstract. Because it does not exist physically, it is called a virtual machine. It’s a specification that creates a runtime environment for Java bytecode to run in. It can also run programs written in other languages that have been compiled into Java bytecode.
- For a wide range of hardware and software platforms, JVMs are available. Because each operating system’s configuration differs, JVM, JRE, and JDK are platform-dependent. Java, on the other hand, is platform-independent. The JVM is divided into three parts: specification, implementation, and instance.
- When you run a Java program, the Java compiler converts your Java code to bytecode first. The JVM then converts bytecode to native machine code.
- Java is a platform-independent programming language. It’s because when you write Java code, you’re writing it for the JVM rather than your physical machine (computer). Java is platform-independent because JVM executes Java bytecode, which is platform-independent.
What is JRE (Java Runtime Environment)?
The Java Runtime Environment (JRE) is a software package that includes Java class libraries, a Java Virtual Machine (JVM), and other components needed to run Java programs.
JRE is the JVM implementation. It provides a platform for java programs to run on. JRE consists of a Java Virtual Machine (JVM), Java binaries, and other classes that allow any program to run successfully.
- The superset of JVM is JRE.
- (JRE) is an acronym for Java Runtime Environment. The Java Runtime Environment (JRE) is a collection of software tools for creating Java applications. It’s responsible for creating the runtime environment. It is the JVM implementation. It contains a collection of libraries as well as other files that JVM uses during execution.
- There are no development tools in JRE, such as a Java compiler, debugger, or JShell.
- If you just want to execute a java program, you can install only JRE. You don’t need JDK because no java source code development or compilation is required.
You might also like:
Introduction to Java | Java Tutorial | Java language
Java Basic Syntax | Java Tutorial
Features of Java | Java Tutorial
We hope that this article will assist you in understanding all about the JDK, JRE, and JVM. We have concentrated on making a basic, meaningful, and easy-to-learn guide to the concepts. Still, if you have any problems regarding this, please post them in the comment section, and we will be glad to assist you.
This Post Has 2 Comments
Pingback: Java Variables | Java Literals | Java Tutorial - Developers Dome
Pingback: Operators in Java | Java Tutorial - Developers Dome