2 ms·
You've forgotten about different processor architectures? Even today there's Intel and ARM, but at the start there was also Sparc which Sun wanted people to use
by pjc50 6y ago
You've forgotten about different processor architectures? Even today there's Intel and ARM, but at the start there was also Sparc which Sun wanted people to use. So, just like WebAssembly, java bytecode operates as a platform-independent instruction set. (ARM provides processors with some ability to execute bytecode directly - Jazelle - but it seems to be obsolete?)
Virtualisation is also not readily available from within userland. We're not at "each process runs in its own VM" yet. Perhaps we'd want "each browser tab runs in its own VM", which is kind of what Javascript aims to achieve.
Microsoft have also gone in this direction; they don't call the CLR a "VM" but it performs many of the same functions in order to run CIL/MSIL bytecode.