The Foreign Function & Memory API (FFM API), finalized in Java 22 as part of Project Panama, is the modern replacement for JNI. It lets Java code call native functions and allocate native memory safely — entirely in pure Java, without writing a single line of C. The three key abstractions are MemorySegment (a region of memory), Arena (its lifetime manager), and MethodHandle (a callable reference to a native function).

Core FFM API types
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.