bytecode verification
The JVM's check, before running a newly loaded class, that its bytecode is well-formed and cannot break the machine's rules.
In more detail
The verifier rejects bytecode that would, for example, pop a value off an empty stack or treat a number as an object reference. It is a real security step, because class files can come from anywhere, not only from javac. Verification happens once per class, at load time.
Related terms
- class loading — The JVM finding a class's bytecode on the class path, reading it and preparing it the first time the class is needed.
- bytecode — A compact, portable instruction format that a virtual machine or interpreter executes, instead of instructions for one particular processor.
Taught in
- The Lifecycle Of A Java Program — Modern Java: Virtual Threads & High-Throughput Services