Search courses or pages...
Trace a tiny Java source file as `javac` turns `.java` text into `.class` bytecode. Connect bytecode to Java’s “write once, run anywhere” idea without treating it like magic.
Compare the JDK, the JVM, and the older idea of a JRE, then place `javac` and `java` in the right part of the toolchain. Recognize why modern Java development usually installs a full JDK even just to run programs.
Apply the previous explanations in a guided problem.
Reason through what the `java` launcher needs: a class name, a valid `main` method, and a way to find compiled code. Use packages, the classpath, JAR files, and the module path as clues for how the JVM locates an application.
Trace what happens after a class is found: class loading, bytecode verification, linking, and initialization. See why the JVM checks code before running it and why classes may load only when they are first needed.
Check your understanding with a short quiz.
Follow bytecode as the JVM interprets it, optimizes hot paths with the Just-In-Time compiler, and uses runtime memory areas like the stack and heap. Connect HotSpot, garbage collection, and machine code to why Java programs can be portable and still fast.
Classify common failures by where they happen in the pipeline: compile time, launch time, class loading, version checking, or runtime execution. Use messages like `cannot find symbol`, `Could not find or load main class`, and `UnsupportedClassVersionError` to reason toward the cause.
Review this chapter with practice based on your mistakes.