Java: JDK JRE JVM
JDK (Java Development Kit):
JDK is the one which provides the environment to develop and execute the java program. It forms an extended subset of a software development kit (SDK). It includes tools for developing, debugging, and monitoring Java applications. It is only used by the Java developers.
JDK is a kit which includes two things. They are:
- Development tools: It provides an environment to develop Java programs.
- JRE: It is used to execute the java programs.
JRE( Java Runtime Environment):
It is an installation package. It provides the environment to only run the program onto your machine. It includes the JVM implementation together with an implementation of the Java class library. It is only used by them who only want to run the program that is end users of the system. It is a superset of JRE.
For example: After developing your accounting application, you want to run this java application into your client’s machine.
JVM( Java Virtual Machine):
It is a very important part of the Java programming language because it is inbuilt or contained in both. The java program you run using the JRE or JDK goes into the JVM and it is used to execute the program line by line it is responsible to execute the program you have to run using the JRE and JDK goes into the JVM and it is responsible to execute the program line by line it is called as the interpreter. You do not need to install the JVM separately into your machine because it is inbuilt into your JDK or JRE installation package.
See some important differences between the JDK, JVM, and JRE:
- JDK is used for the development purpose.
- Java Runtime Environment is used for running the java program.
- Java Development Kit and Java Runtime Environment contain JVM so that we can run the java program.
- Java Virtual Machine is a heart of Java programming language and provides the platform independence.
Java Virtual Machine:
JVM is a runtime environment for the compiled java class files. JVM has executed byte codes. JVM is a platform dependent.
What is JVM ?
JVM is a Java Virtual Machine which executed byte codes. To choose the algorithm implementation provider is independent. Its implementation is called as JRE. When you write java program on the command prompt to run the java class an instance of JVM is created is called runtime instance.
Internal Architecture of JVM:
- Classloader: It is a subsystem of JVM which is used to load class files.
- Class(Method) Area: It stores per-class structures like runtime constant pool, field and method data, the code for methods.
- Heap: Objects are allocated in the runtime data area.
- Stack: It can store the frames, hold the local variables and partial results. It is a part of method invocation and returns. Every thread has a private JVM stack. A new frame will be created each time when the method is invoked. Each Frame should be destroyed when the method invocation completes.
- Program Counter Register: It contains the address of JVM instruction that is currently executed.
- Native Method: It contains native method used in applications.
- Execution Engine: It contains a virtual processor, and interpreter that reads byte code stream then execute the instructions and Just-In-Time compiler to improve the performance.
Quickly Find What You Are Looking For
OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.
point.com