How can an application be rewritten in machine code and interfaced with Java?

StackOverflow https://stackoverflow.com/questions/18788639

  •  28-06-2022
  •  | 
  •  

Вопрос

I was reading The Java Language Environment. In the High Performance section I found this block

Applications requiring large amounts of compute power can be designed such that compute-intensive sections can be rewritten in native machine code as required and interfaced with the Java platform.

I didn't get it in fact, so how can an application be written in native machine code and interfaced with the Java platform?

Это было полезно?

Решение

You can use JNI to interface with native code.

Другие советы

Be sure this is really what you want/need. Modern JVM offers a lot of performances in terms of Java code optimization, so "simple" Java is often enough.

JNI is powerful, but it brings a lot of headaches ...

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top