Posts

Showing posts from January, 2026

JVM-ClassLoader

Image
Class Loader Subsystem ensures that classes are loaded safely, lazily, and hierarchically, enabling Java’s security, modularity, and runtime flexibility. Why we need JVM JVM is responsible for making Java program Platform Independent, We write a Java Code (.java) --then--> compiler (javac) --compile it and create --> Byte Code (.class) --then--> Java Interpreter convert into machine code How JAVA Runs the Application JVM Architecture Think of JVM as 4 major pillars : 1️⃣ Class Loader Subsystem 2️⃣ Runtime Data Areas (Memory) 3️⃣ Execution Engine 4️⃣ Native Interface & Libraries Class Loader Subsystem The Class Loader Subsystem perform three part: Loading Linking Initialization What Loading does JVM locates and reads a  .class files and create an in-memory representation of that class. When JVM sees a reference like:  new User(); Then: It finds the fully qualified class name Asks a class loader to load it. Reads bytecodes from: File System JAR Network (rare) ...

From Power ON → Firmware → OS Kernel → Process Creation → JVM → Bytecode Execution, every layer matters when you’re designing:

Image
 I’ve created this visual to help junior developers understand the full journey — from hardware to Java execution. Break down it into 4 clear stages: Stage 1: System Boot A computer contains: CPU → the "thinking" unit RAM → temporary workspace for running programs Hard Disk / SSD → permanent storage When the computer is off: RAM is empty CPU has no instructions OS resides on the disk, not in memory The computer doesn’t yet know where the OS is. Step 1 – Power ON: Firmware Starts Firmware: a small permanent program on the motherboard (examples: BIOS/UEFI) Why is it needed? CPU doesn’t know where OS is CPU doesn’t know how to use RAM or disk Firmware acts as the CPU’s first teacher What firmware does: Takes control of CPU Performs hardware checks (RAM, CPU, Disk) → POST (Power-On Self Test) Finds a bootable device → locates the OS Step 2 – Bootloader Loads Firmware loads the bootloader from the disk: Windows → Windows Boot Manager Linux → GRUB Bootloader loads the OS kernel in...