How does a program work internally in Java?

During compilation

Java Code
Compiler
Byte code

When program runs

Class File
Class Loader
Byte code verifier
Interpreter
Runtime
Hardware

Class Loader - a part of JVM that loads class files.

Bytecode Verifier - checks the code fragments for illegal code that can violate access right to objects.

Interpreter - reads bytecode and executes the instructions.


Related topics

What is JVM, JDK and JRE ?