Java 19 Project Panama 4 Newbies
summary
Shows using OpenJDK’s Foreign Linker/Memory APIs (JEP 419/424 preview, successor to JEP 412) plus the jextract generator to replace messy JNI, claiming comparable or better performance and incremental migration. Demonstrates real builds: calling getpid/printf, allocating off‑heap via an implicit memory segment allocator, arrays and structs with offsets, and MethodHandles for C symbols. Live demos include SDL+OpenGL game window, a Swift callback, Leap Motion input, and a working FFmpeg+JavaFX video stream. Requires adding module jdk.incubator.foreign and --enable‑native‑access.
AI-written summary · about
chapters (11)
- 0:00Introduction to Project Panama
- 1:20Overcoming JNI pain points
- 4:08Panama architecture and benefits
- 7:42Demos and native interaction
- 11:34Advanced integration examples
- 17:29Setting up the environment
- 20:51Method handles and low-level access
- 25:06Using jextract for automation
- 34:09Building a hello world app
- 41:00Memory management and best practices
- 50:20Q&A and concluding thoughts
related talks
01h 01mJava Enable Preview: Foreign Function and Memory Interface
29mEasily Leverage Native Functions with Project Panama from Java
01h 04mProject Panama Unleashing Native Libraries
36mA Promising Future for using Native Libraries in the Java World
45mProject Panama - Foreign Function & Memory API
16mForeign Function and Memory API
55mBare metal Java
33mFrom native code gems to Java treasures with jextract
