JDK
JDK stands for Java Development Kit, It is a software or tool which helps the developer to develop java programs, that means JDK is used to write, compile, debug and run the Java programs.
It contains 3 main part :
- JRE : It is responsible for running Java programs
- JVM : It is the engine that executes Java bytecode
- Development Tools :
- javac → Translates human readable dot java source files into dot class bytecode files, we can say it is a Java compiler.
- java → It executes compiled Java applications by starting up the runtime environment, we can say it is a Java launcher.
- javadoc → Automatically builds HTML documentation pages directly from your code comments, we can say it is a Java documentation generator.
- jar → Packages multiple class files and resources into a single compressed .jar file for easy distribution, we can say it is a Java archiver.
- jdb → Helps inspect and find errors in the code line by line, we can say it is a Java debugger.
JRE
JRE stands for Java Runtime Environment.After development the java application, it provides everything needed to run Java applications.
It contains 2 main part :
- JVM : It is responsible for converting the Java bytecode into machine language specific to your operating system
- Core Java Libraries : It contains pre-written classes and methods that provide common functionality for Java applications along with supporting files to run the applications smoothly
JVM
JVM stands for Java Virtual Machine. It executes Java bytecode into machine code specific to the operating system, enabling Java programs to run on different operating systems.
How JVM Works :
After writing java code (.java files) the compiler (javac) compiles the code into bytecode (.class files). Then, when you run the program, the JVM takes this bytecode and translates it into machine code specific to that operating system that can be executed by your computer's processor.
This process allows Java to be platform-independent, meaning you can write your code once and run it anywhere without modification.
See you in next page....🙂