diff --git a/support-lib/jni/djinni_support.cpp b/support-lib/jni/djinni_support.cpp old mode 100644 new mode 100755 index 142b9e220..598d293ec --- a/support-lib/jni/djinni_support.cpp +++ b/support-lib/jni/djinni_support.cpp @@ -69,6 +69,10 @@ void jniShutdown() { g_cachedJVM = nullptr; } +JavaVM * jniGetVM() { + return g_cachedJVM; +} + JNIEnv * jniGetThreadEnv() { assert(g_cachedJVM); JNIEnv * env = nullptr; diff --git a/support-lib/jni/djinni_support.hpp b/support-lib/jni/djinni_support.hpp old mode 100644 new mode 100755 index ddae5049d..706d3dd6f --- a/support-lib/jni/djinni_support.hpp +++ b/support-lib/jni/djinni_support.hpp @@ -42,6 +42,13 @@ namespace djinni { void jniInit(JavaVM * jvm); void jniShutdown(); +/* + * Get the JavaVM which was registered in the onload for e.g. forwarding to other libraries + * + */ + +JavaVM * jniGetVM(); + /* * Get the JNIEnv for the invoking thread. Should only be called on Java-created threads. */