To, er, avoid any further "interesting" interpretations of what "compile" and "interpret" mean with respect to running software I'd just like to chime in:Interpreted
languages use an interpreter
which reads a sequence of non-hardware-native instructions and calls subroutines to execute each instruction. Machine code is actually interpreted by the CPU.Compiled
languages convert from one language into another language. This can mean compiling from Java to C, or from Java to bytecode, or from bytecode to machine code.Machine code
is an interpreted language; it's interpreted by hardware, is the only difference. Quite often these days it's even further compiled internally in the CPU into microcode
which is even lower level than machine code and subsequently even faster when it's read from a cache.The Java Compiler
is just that - it compiles the Java language into bytecode.The Hotspot Virtual Machine
is a hybrid interpreter and compiler. It performs honest-to-goodness interpretation
of Java bytecode and calls machine code subroutines to execute byte code. After a little while it decides that some bits are best compiled
, and it subsequently compiles the bytecode directly into machine code and caches it, shifting the onus of interpretation directly onto the CPU.
Why this is still a subject of debate is baffling, unless it's some language quirk in non-native English speakers that's causing an unforeseen confusion.