Modern Java does support directly calling C functions, with structs.
And also upcalls back to java.
All without any JNI style preprocessing or stubs.
https://docs.oracle.com/en/java/javase/21/core/calling-c-lib...
https://docs.oracle.com/en/java/javase/21/core/calling-c-lib...