In this post, we will discuss the Java platform overview for testers. Often, novice testers get confused about the keywords of the Java Platform. Here, we will attempt to clear the confusion with a pictorial view of JDK, JRE, and the JVM.
First of all, the components of the Java platform are the Java Development Kit (JDK), Java Run-time Environment (JRE), and the Java SE application programming interface (API). JDK contains the JRE and the compilers and debuggers necessary for developing applications. JRE provides the libraries, the Java Virtual Machine (JVM), and the components needed to run Java applets and applications.
JDK: ( Java Development Kit )
The JDK includes the Java Run-time Environment ( JRE ), the Java compiler, and the Java APIs. The JDK is a development environment for building Java Applications using the Java Programming Language. JDK contains everything that will be required to develop and run Java application. It contains the JRE and development tools like compiler (javac), java application launcher (java.exe), etc.
JRE( Java Run-time Environment )
The Java Run-time Environment, also known as Java Run-time, is part of the Java Development Kit (JDK), a set of programming tools for developing Java applications. The Java Run-time Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files.
JVM: ( Java Virtual Machine )
JVM is responsible for converting the byte-code into machine language and executing the program. It performs the following operations. ( In detail here: Java Virtual Machine )
In addition, JVM is a virtual machine that works on top of your operating system to provide a recommended environment for the compiled Java code. JVM only works with byte-code. Therefore, we need to compile the java application(.java) so that it can be converted to byte-code format ( .class file). Which then will be used by JVM to run the application.