How to send callback from Java code to unreal C++ using JNI?

I happened to be searching for this too, and from what I can tell there seems to be a good answear here:

I haven’t used this yet so if it’s outdated and no longer works we might have to look for something else.