I am looking for the best approach for calling modern C++ 11/14 code from java (with callbacks from C++ back to java). What is the best/easiest/fastest performance way to get interoperability between java and C++ 11/14? I have been programming in python and C++ for a while and have come to depend upon pybind11. I am looking for something similar to (or better than) pybind11 for java.
I am aware of jni and jna. But jni is too low-level, tedious, and error prone. And according to this blog post "JNA is significantly slower than the JNI." That blog post uses bridj, but in the three years since that article was written bridj seems to have gone from being "a relatively young project" to one that has only two commits since then.
I am also aware of swig, but for python at least, I much prefer the direct wrapping that pybind11 offers over the wrapper generator approach of swig. I have come across jni.hpp and javacpp. jni.hpp seems to look the most like pybind11 but it looks to be immature and not widely used within the java community. Is javacpp the closest java/c++ equivalent to pybind11 for python/c++?
I appreciate any guidance.
(For those who closed this question as a duplicate of the over 7 year old question How to call C++ from Java?, my question is asking about the current best libary that supports java/c++ interoperability using up-to-date C++ language improvements that have taken place since 2011. Please re-open.)