Answer the question
In order to leave comments, you need to log in
How is creating a JVM for specific platforms "better", "simpler", "more advanced", "more correct" than writing compilers for the same platforms?
Books and articles about the Java programming language always say that the idea of compiling bytecode, which is executed by a strictly standardized JVM, solved the problem of portability, platform independence, programs.
Like, instead of writing a compiler for each platform, which is quite complicated and expensive, it is now enough to write a virtual Java machine for each platform, which, by the way, is much easier. At the same time, I have never met an explanation: what, in fact, is easier? :)
Answer the question
In order to leave comments, you need to log in
Simplifications for tool developers is a very tricky topic. It is much easier to explain the benefits from the perspective of an application programmer and software users. In 2003, I participated in the development of one system in Java EE. The code written by me and other developers was compiled using Java 1.4, packaged in war and deployed on the customer's server. It was a server with 32-bit Xeon Prestonia processors running FreeBSD. Later, this application in the same war file was ported to the Fujitsu PRIMEPOWER server with completely different architecture processors - SPARC, and controlled by a very different operating system - Solaris. Now it is running on IBM's blades with POWER processors and running AIX, as far as I know. I won't be surprised if after some time the application is transferred to something with ARMs and under Linux or HP-UX. All these migrations are performed without recompilation and without involvement of developers. If the application were written in something like C++, the application code would have to be ported to each platform and recompiled. It was long, difficult and very expensive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question