How does bytecode get verified in the JVM?
问题 How does bytecode get verified in the JVM? 回答1: Oracle themselves have a little snippet page on how it works here. Basically, the JRE doesn't trust the JDK. That's because it has no knowledge of which JDK compiler created the class file. It treats the class file as hostile until verified. Expanding on that, the bytecode verification is a necessary step to protect from what Sun call a "hostile compiler". Sun's own Java compiler ensures that Java source code doesn't violate the safety rules but