Is there a way to connect to an already running JVM?
For example, in the JNI, you can use JNI_CreateJavaVM to create a virtual machine and run the bank and check all her classes.
However, if the jar is already running, I can not find a way to connect to its JVM and communicate with its classes or get it index env .
Another problem is that if the jar loads my home library (DLL), and I want to create a JVM inside the .dll, I can not .. I also can not connect the current JVM jar without a jar, calling my function ..
Example from Java:
class Foo { static {loadLibrary("Foo")} } } class Foo { static {loadLibrary("Foo")} }
on the side of C ++:
void Foo() {
It can not be done without calling the flag Foo .
Any ideas? There is a way to get the current JVM or attach a copy of or an external jvm?
source share