Hacker News new | past | comments | ask | show | jobs | submit login

This change has nothing to do with JNI whatsoever.

The JVM has always (well, not always, but for 15+ years) run Java code by first compiling it to native code. The only difference is that the JVM will now allow you to optionally do the compilation ahead of time, in order to decrease an application's startup overhead. This actually hurts performance of the compiled methods, since runtime profiling is not available to the AOT compiler (but the document also describes a "tiered" mode, where AOT-compiled code can be dynamically replaced with a better JIT-compiled version at runtime).

If you want to link your Java code with native code written in a non-Java language, that's a totally different requirement, and JNI will continue to be the way to accomplish it.




> and JNI will continue to be the way to accomplish it.

Although if you don't like JNI, you can use JNA [1] (which I believe uses JNI to link to libffi, and libffi for the rest).

[1] https://github.com/java-native-access/jna


> JNI will continue to be the way to accomplish it.

Not on Java 10 hopefully.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: