In order to start programming in Java, we need to make sure all the pre-requisites are fulfilled. The machine must contain a package that provides the environment for software development and execution in Java. This environment is provided by JDK. Let us explore the theoretical aspects of JDK.
Java Development Kit is commonly known as the JDK. It provides a software development environment for the development and execution of Java-based applications. It has physical existence in the machine. The contents of the JDK are as follows:
There are three Java platforms released by Oracle. Each of the platforms has a specific utility. They are:
JDK is an implementation of any one of the platforms given above.
Java Runtime Environment is commonly known as JRE. It is a part of JDK and has its utility in providing the run time environment only. It has no role in the development of the Java program/application. It provides a minimum requirement for the execution of a Java program to be successful. It comprises of many libraries and toolkits with their dedicated utility in user Interface( Abstract Window Toolkit), Integration(Java Database Connectivity), Other Base Libraries(Java Management Extensions), and Deployment( Java Web Start). One of the most important members of JRE is JVM(Java Virtual Machine).
Let us look at the basic flow of JRE in the execution of Java Program.
.java
) , the compiler(javac
) creates the byte code(extension .class
).JVM stands for Java Virtual Machine. It is a virtual machine and doesn't exist physically. It is a specification that provides a runtime environment. Regardless of the java program, it is JVM which is responsible to execute the byte code line by line. The main tasks of JVM include loading, verifying, executing, and providing the execution environment.
There are three notions of JVM. They are: