Get JVMTI environment
suggest changeInside Agent_OnLoad. This is C++, and GetEnv returns a jint. Use jvmti only when that return is JNI_OK:
jvmtiEnv* jvmti;
/* Get JVMTI environment */
jint result = vm->GetEnv(reinterpret_cast<void **>(&jvmti), JVMTI_VERSION);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents