1
1
12rbah2020-06-23 09:24:19
Java
12rbah, 2020-06-23 09:24:19

Why does Java use bytecode for cross-platform?

To transfer to a new platform, you need to write a virtual machine for this platform, but what's the problem in making a compiler for the new platform (for compiled languages) that will provide the same cross-platform?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-06-23
@12rbah

How is creating a JVM for specific platforms "better", "simpler", "more advanced", "more correct" than writing compilers for the same platforms?

P
pfg21, 2020-06-23
@pfg21

debugging one virtual machine is easier than debugging a bunch of compiled software.
although there is also JIT compilation / optimization of Java code for a specific platform.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question