Java 的 “一次编写,处处运行”如何实现?(How to realize the “write once, run everywhere” of Java?)

JAVA之所以能实现 一次编译,到处运行,是因为JAVA在每个系统平台上都有 JAVA虚拟机(JVM),JAVA编译的中间文件class是由JAVA虚拟机在运行时动态转换为对应平台的机器代码。

————————

The reason why Java can compile once and run everywhere is that Java has java virtual machine (JVM) on each system platform. The intermediate file class compiled by Java is the machine code dynamically converted into the corresponding platform by Java virtual machine at runtime.