Java Native Interface

The Java Native Interface (or Native Method Interface) is a foreign function interface designed for non-Java programming framework. The JNI enables Java code to call and be called by native calls, native applications (programs specific to a hardware and operating system platform) and libraries written in other languages such as C, C++ and assembly.

Java 22 introduces the Foreign Function and Memory API, which can be seen as the successor to Java Native Interface.