Java JDK JRE JVM
JDK – Java Development Kit (in short JDK) is Kit which provides the environment to develop and execute(run) the Java program.
JDK is a kit(or package) which includes two things Development Tools(to provide an environment to develop your java programs) JRE (to execute your java program).
Note : JDK is only used by Java Developers.
JRE – Java Runtime Environment (to say JRE) is an installation package which provides
an environment to only run(not develop) the java program(or application)onto your machine.
JRE is only used by them who only want to run the Java Programs i.e. end users of your system.
JVM – Java Virtual machine(JVM) is a very important part of both JDK and JRE because
it is contained or inbuilt in both. Whatever Java program you run using JRE or JDK goes into
JVM and JVM is responsible for executing the java program line by line hence it is also known as interpreter.
When you run the Java program, Java compiler first compiles your Java code to bytecode.
Then, the JVM translates bytecode into native machine code (a set of instructions that a
computer's CPU executes directly).
Java is a platform-independent language. It's because when you write Java code,
it's ultimately written for JVM but not your physical machine (computer).
Since JVM executes the Java bytecode which is platform-independent, Java is platform-independent.
No comments: