$linuxjunkies
>

bytecode

also: intermediate code, VM code

Intermediate machine-independent code produced by compilers that must be interpreted or further compiled before execution. It serves as a bridge between human-readable source code and native machine instructions.

Bytecode is compiled code that operates at a level between high-level source code and low-level machine instructions. Rather than compiling directly to CPU-specific binary, a compiler generates bytecode that can run on any system with the appropriate runtime environment or virtual machine.

In the Linux ecosystem, Java bytecode is the most common example. When you compile a Java program with javac, it produces .class files containing bytecode. The Java Virtual Machine (JVM) then interprets or just-in-time (JIT) compiles this bytecode to native machine code at runtime, allowing the same bytecode to run on any Linux system with a JVM installed.

Other examples include Python's .pyc files (compiled to bytecode for performance) and .NET Intermediate Language. Bytecode enables portability and platform independence since it abstracts away hardware differences.

Related terms