What does the Java Virtual Machine actually run?

Bytecode in class files, not Java source code.

Start playing free

  1. Bytecode in class files ✔
  2. Java source code
  3. Native code for each CPU

Why: Java source is compiled into class files containing JVM bytecode. The JVM knows nothing about the Java language itself, only that binary format. That is why other languages like Kotlin can run on the JVM too.

Huh, didn't know that: The class file format is hardware and operating system independent, which is the heart of write once, run anywhere.

The dad joke
Why do Java developers wear glasses? Because they don't C#.
Like this card?
Play the game

References

Answer: Bytecode in class files. Java source is compiled into class files containing JVM bytecode. The JVM knows nothing about the Java language itself, only that binary format. That is why other languages like Kotlin can run on the JVM too.

  1. The Java Virtual Machine Specification, Java SE 21: Introduction docs.oracle.com/javase/specs/jvms/se21/html/jvms-1.html
    The Java Virtual Machine knows nothing of the Java programming language, only of a particular binary format, the class file format.
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game