JDK | JRE | JVM |
---|---|---|
Full form of JDK is Java Development Kit | Full form of JRE is Java Runtime Environment | Full form of JVM is Java Virtual Machine |
JDK is platform dependent | JRE is platform dependent | JVM is platform independent |
JDK is a software development kit | JRE is a software bundle that allows Java program to run | JVM is an environment for executing bytecode |
JDK contains the installer | JRE contains the environment to execute source code | JVM contains both software JDK and JRE |
JDK contains tools for developing, debugging, etc. | JRE contains class libraries and other supporting files | JVM conatins none of software development tools |
Compiler | Interpreter |
---|---|
Executable file is : javac.exe | Executable file is : java.exe |
Compiler scans the entire program and translates it as a whole into machine code. | Interpreter translates program one statement at a time. |
Compilers usually take a large amount of time to analyze the source code. | Interpreters usually take less amount of time to analyze the source code. |
The overall execution time is comparatively faster than interpreters. | The overall execution time is comparatively slower than compilers. |
Compiler displays all errors after compilation | Interpreter displays errors of each line one by one |
Compiler is based on translation linking-loading model | Interpreter is based on Interpretation model |
Generates intermediate byte code which further requires linking, hence requires more memory. | No intermediate byte code is generated, hence are memory efficient. |
Compiler compile the code after saving process done. | Interpreter compile line by line |
Byte Code | Machine code |
---|---|
Byte code is a non-runnable code generated by compiling a source code that relies on an interpreter to get executed. | Machine code is a set of instructions in machine language or binary(1’s and 0’s) code which can be directly executed by the CPU. |
Comments