Write Code (Source Code) You write a Java program and save it as a .java file. Example: HelloWorld.java Compilation (Java Compiler – javac) The Java compiler converts your human-readable code (.java) into bytecode (.class file). Bytecode is platform-independent, meaning it can run on any machine that has a JVM. Execution (Java Virtual Machine – JVM) The JVM reads the bytecode and executes it line by line. Inside JVM: Class Loader loads the .class files. Bytecode Verifier checks for security and validity. Interpreter / JIT Compiler (Just-In-Time) converts bytecode into machine code for your specific OS/CPU to run faster. Runtime Environment (JRE) The Java Runtime Environment (JRE) provides the libraries, JVM, and other components required to run the program. Development Kit (JDK) The Java Development Kit (JDK) includes both JRE + tools (like javac, debugger, etc.) to develop and run programs.