Understanding JDK, JRE, JVM and the Java Flow ☕
Today I learned how Java programs actually work internally.
What I Learned
JDK (Java Development Kit)
Used for developing Java applications.
It contains:
- Compiler (
javac) - JRE
- Development tools
JRE (Java Runtime Environment)
Provides the environment required to run Java programs.
JVM (Java Virtual Machine)
Executes Java bytecode and makes Java platform independent.
Java Working Flow
```text id="dsvx9f"
Hello.java
↓
Compiled using javac
↓
Hello.class
↓
Executed by JVM
↓
Output
---
## Compile vs Run
### Compile Code
Converts:
```text id="f7i9pn"
.java → .class
Command:
```bash id="1o84xq"
javac Hello.java
### Run Code
Executes the compiled bytecode using JVM.
Command:
```bash id="h5mr7f"
java Hello
Key Takeaway
```text id="9m1ci6"
JDK → Develop
JRE → Run
JVM → Execute
Understanding these basics helped me connect how Java code moves from source code to actual output.
Learning Java step by step every day. 🚀
#java #beginners #programming #backend #coding #developers #100DaysOfCode
Top comments (0)