JEP 191: Foreign Function Interface • Java 14 (2020/3/17) • JEP 370: Foreign-Memory Access API (Incubator) • Java 15 (2020/9/15) • JEP 383: Foreign-Memory Access API (Second Incubator) • Java 16 (2021/3/16) • JEP 393: Foreign-Memory Access API (Third Incubator) • JEP 389: Foreign Linker API (Incubator) • Java 17 (2021/9/14) • JEP 412: Foreign Function & Memory API (Incubator) • Java 18 (2022/3/22) • JEP 419: Foreign Function & Memory API (Second Incubator) • Java 19 (2022/9/20) • JEP 424: Foreign Function & Memory API (Preview) ← イマココ
対応環境 • Microsoft x64 ABI (Windows on x64) • System V AMD64 ABI (Linux on x64, Intel Mac) • macOS AArch64 (M1 mac) • AAPCS ABI (Linux on Arm64) • 対応外の環境で動かすと実行時に例外が飛ぶ • java.lang.UnsupportedOperationException: Unsupported os, arch, or address size Linker linker = Linker.nativeLinker();
minor=-1, major=63 int magic = (int) MAGIC.get(segment); short minor = (short) MINOR_VERSION.get(segment); short major = (short) MAJOR_VERSION.get(segment); System.out.format("magic=%02X, minor=%d, major=%d¥n", magic, minor, major);