A small not very professional explanation of the work of performers of the language.
Exist:
- Compilers
- Interpreters .
- And compiler interpreters, or interpreters of compiling type .
Drop the first two and discuss the third.
The compiler of the interpreting type is essentially a two-in-one compiler and interpreter, such a performer is a JVM , after writing the program text, the JVM primarily uses a compiler that compiles your text into byte-code, while this stage has a number of optimizations empty loops, do not go through bytecode, it also happens that the compiler translates text into pure machine code, thanks to which such a crazy speed is achieved. But the next step will be the execution of this byte-code, and this is what the JIT interpreter, which interprets the machine and byte codes, is already engaged in, bringing us the result.
Accordingly, now you yourself have to understand why it is impossible to achieve a one-time execution - the program is in half, it is executed dynamically, that is, if byte code we can, in principle, be compiled once, but we need to interpret the byte code uniquely each time. This technology is called JIT interpreters .
And all that I have described here is without taking into account many other points, optimizations, hacks and technologies ... But as far as I know, from any Java application, for example, you can get a final executable file, it’s another question whether it’s convenient to achieve executable file and why do you need then the language on the JVM ? After all, the advantages of such languages ​​are objectively visible on servers, for example.