This question has already been answered:

Is it possible? to speed up the work. To get the machine code and then keep it in this form.

Reported as a duplicate by Barmaley , Artem Konovalov , user194374, Denis Bubnov , aleksandr barakin 14 Jan '17 at 1:39 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Do you want to make an executable file for different systems? Android also performs bytecode, not machine, in this respect it is no different. if you need speed, then you need to write on b. - Mikhail Vaysman
  • one
    @MikhailVaysman In fact, the question is adequate and you prematurely send a person to C Because, for example, in .NET there is a utility Ngen.exe, which transforms a ready-made program (this is also a byte code) into native code. - Vadim Ovchinnikov
  • @VadimOvchinnikov I did not send anyone anywhere. I asked a suggestive question. And he explained that the android also works like a JVM. - Mikhail Vaysman
  • The JVM already has a compilation mechanism built into the machine code, and this happens automatically. This feature is called JIT. If a bytecode is executed several times, then it is compiled into machine. But I'm talking about JVM, and not about Dalvik. How it works Dalvik, I do not know. - Mikhail Vaysman

1 answer 1

A Java program is compiled into a byte code that is understandable for the JVM, after running the application under the JVM code, the actual code will be transferred to the machine code for execution on the hardware, only you will not be concerned about it. Thus, Java achieves cross-platform.

  • You seem to have not even read the question. I just want to abandon cross-platform Java. I want a compiler that compiles not in byte code, but in a native compiler for each operating system. - Turalllb