3 ms·
> Then you run javah, which gives you some C glue code that you eventually need to compile. That's deprecated and no longer supported in Java 10. The recommend
by needusername 9y ago
> Then you run javah, which gives you some C glue code that you eventually need to compile.
That's deprecated and no longer supported in Java 10. The recommend way is to use javac -h.
> This is very fast
There is a certain call overhead for JNI that JNA and JNR necessarily share as well. As a normal Java application you don't really have a way to get around this.
See https://stackoverflow.com/questions/36298111/is-it-possible-to-use-sun-misc-unsafe-to-call-c-functions-without-jni/36309652#36309652 https://stackoverflow.com/questions/36298111/is-it-possible-...
> but it's annoying because now you need a tool chain everywhere.
You only need a toolchain for building, you can just ship the .so. These days you get pretty far with Linux 64bit, macOS 64bit and Windows 64bit.