Java Hello World, LLVM Edition: JIT-Compiling Native Code Directly from Java (No JNI Required) Core question this article answers: How can you generate LLVM IR, JIT-compile it to real machine code, and execute it entirely from a pure Java program — using only the Foreign Function & Memory API introduced in Java 22+? The answer is surprisingly clean: combine Java’s modern FFM API with jextract-generated bindings to the LLVM C API, build a module in memory, hand it to the LLVM JIT, grab the function pointer, turn it into a MethodHandle, and call it. The entire “Hello, World!” program below …