Can I insert a DLL in the JVM and get JNIEnv?

I want to be able to embed a .dll into a running JVM process. I am wondering, as soon as I do this, can I somehow get an instance of JNIEnv that will allow me to access objects within the JVM? What I'm trying to achieve is something like Java Reflection lines, but at a native level.

+5
source share
1 answer

The Attach API is what you want to implement the DLL from outside the process. Please note that this requires appropriate OS permissions. Then use the JNI Invocation API and the standard JNI APIs to do everything you need from the inside.

Attach API from Oracle and Attach API from IBM

0
source

All Articles