Source, Bytecode and JVM
- Compile once. Java source compiles to bytecode: a portable instruction set no CPU speaks directly.
- The JVM. The JVM executes bytecode anywhere it is installed: write once, run on any machine with a JVM.
- JIT compilation. The JVM watches hot code and JIT-compiles it to native machine code while running: warm Java gets genuinely fast.
How Java Applications Execute
- The main method. Execution starts at main: public static void main(String[] args) is the JVM’s agreed front door.
- Classes as units. Java code lives in classes: every method and field belongs to one, and files mirror class names.
- The classpath. The classpath tells the JVM where compiled classes and libraries live: most “class not found” errors are classpath errors.
Before and after this level
- Before: nothing. This is where the course starts.
- Next: Level 1: Java Foundations: Types, Variables and Operators, Conditions and Loops, Methods and Basic Programs.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does Java: Start Here: Java and the JVM cover?
Source, Bytecode and JVM, How Java Applications Execute: 2 lessons and 6 ideas.
Is this level free?
Yes. Start Here: Java and the JVM is the free first level of the Java course, with its checkpoint and flashcards.