Background: I had a project in mind for attaching to an existing JVM and then
iterating through the active threads in the VM dumping out the current state
of each thread.

As I was researching the feasibility of this project I could not find the
appropriate JNI function that would allow me to attach to an existing JVM.
The AttachCurrentThread(...) function in the Invocation API requires a pointer
to the JavaVM object that you could obtain from a call to JNI_GetCreatedJavaVMs(...).
From the documentation it seems that the "GetCreatedJavaVMs" function only
returns JavaVMs created by calling JNI_CreateJavaVM. My issue is I don't
created the VM from my app. The VM is already executing in it's own process

Is it possible to attach to an existing VM using JNI?

Thanks in advance...