getEnv

context(placement: NativePlacement)
fun JavaVM.getEnv(version: JniVersion): JniEnv(source)

If the current thread is not attached to the VM or the specified version is not supported, throw an exception. Otherwise, returns JniEnv.

Parameters

version

the requested JNI version.