Card 06/ 06
All 6 cards
RecapDifficulty: Intermediate1 min
What Turns Your Text Into Something That Runs
Four things this topic established, and where each one was.
| The thing | Where |
|---|---|
| Java translates twice: text to bytecode, then bytecode to processor instructions | Why Your .java File Is Not a Program Yet |
javac writes a .class file; java takes a class name and runs it | One Command Writes a File, the Other Reads It |
| The bytecode is identical everywhere; the JVM is what is built per machine | The Same Build Artefact on a Laptop and on a Linux Server |
| The JDK contains the JRE, which contains the JVM — install the JDK to compile | JDK, JRE and JVM: Which One You Actually Install |
The JVM looks for one exact main signature and reports nothing until you run it | It Compiled, and Then Said No Main Method Found |
A failure's timing tells you which translation caught it. Compile-time means the text was not valid Java. Runtime means it was, and something about the world was not what the code assumed.