Project Panama Unleashing Native Libraries
summary
Project Panama lets Java call native libraries without handwritten JNI wrappers by providing FFI and Memory Access APIs that describe native layouts (structs, unions, sequences), manage off‑heap memory with arenas/segments, and create downcall/upcall method handles. The JExtract generator (requires clang) emits bindings and static initializers automatically (Jextract (requires clang)). JDK22 ships the APIs (JExtract remains EA); simple primitive calls match JNI performance, complex by‑value structs cost more. JDK22 GA, JExtract EA
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:46Why Project Panama
- 8:49JNI drawbacks
- 15:15Project Panama components
- 16:38Foreign memory access
- 29:21Memory layouts
- 36:12Memory access handles
- 39:42Foreign function support
- 50:02JExtract tool
- 55:11Performance comparison
- 57:21Trivial linker option
- 58:03C++ and Project Panama
- 1:00:14JNI alternatives
- 1:02:03Project history
- 1:03:27Q&A and resources
related talks
36mA Promising Future for using Native Libraries in the Java World
29mEasily Leverage Native Functions with Project Panama from Java
43mPanama Update
43mProject Panama’s Foreign API
45mProject Panama - Foreign Function & Memory API
55mJava 19 Project Panama 4 Newbies
33mFrom native code gems to Java treasures with jextract
46mBare Metal Java
