If you have ever written a JNI wrapper, you remember the ritual: a header, a C file, a compiler, and…