Using JNI with Unreal Engine 4

Has anybody tried to use JNI with UE4? Is it even possible? If it can be done, will there be a performance impact for modules outside the ones that use the JNI?

I want to use a library that has a C++ interface through JNI and I was wondering if anyone has done something similar.

Edit: I realise that this question actually belongs in the Engine Source subforum.