L
L
lem_prod2016-02-19 00:45:48
Java
lem_prod, 2016-02-19 00:45:48

The essence of the Java virtual machine?

Please explain on your fingers what the Java runtime environment is, why most languages ​​are either compiled or interpreted, while Java has something incomprehensible ...
What provides cross-platform? I correctly understood that without additional software, the program in Java will not start in the same Windows ...?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Walt Disney, 2016-02-19
@lem_prod

Well, look, the computer processor understands opcodes, different processors have their own opcodes, x86, AMD64, ARM, etc.
Compiled languages ​​are those that, as a result of compilation, give code executable on a particular processor. A simple program can be compiled for different processors without problems, but compiled for one cannot be run on another.
Interpreted languages ​​act differently; they include an interpreter that translates the program code into processor opcodes. Accordingly, having implemented the interpreter once on different platforms, we get a cross-platform language.
The java virtual machine is also an interpreter in essence, but it is not the java program itself that enters it, but its transformed version, i.e. already tested and more VM friendly.
Yes, you understood everything correctly, without a JVM, a java program cannot be launched anywhere. I note that, for example, your phone's sim card has a processor on which the JVM is running and the software that is running on it, I mean that java's cross-platform is really wide.

V
Vladimir Martyanov, 2016-02-19
@vilgeforce

Explain on the fingers the essence of the microprocessor offer? Good question, but no. Google P-Code and JIT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question