3 ms·
JNI is extremely tedious. Not only do you have to have a native library built for every platform you support, you also have to manually convert between Java and
by grishka 5y ago
JNI is extremely tedious. Not only do you have to have a native library built for every platform you support, you also have to manually convert between Java and C representations of things. A lot of glue code for which there are no generators (I think). JNA is better, it still relies on JNI, but uses a tiny stub library to allow you to link to and call arbitrary functions from C dynamic libraries in pure Java.
This feature is basically JNA, but more efficient and built into the JVM itself.