< prev index next >
src/jdk.management/share/native/libmanagement_ext/management_ext.c
Print this page
*** 23,43 ****
* questions.
*/
#include <stdio.h>
#include <jni.h>
#include "jvm.h"
#include "management_ext.h"
#define ERR_MSG_SIZE 128
const JmmInterface* jmm_interface = NULL;
JavaVM* jvm = NULL;
jint jmm_version = 0;
JNIEXPORT jint JNICALL
! JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv* env;
jvm = vm;
if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_2) != JNI_OK) {
return JNI_ERR;
--- 23,44 ----
* questions.
*/
#include <stdio.h>
#include <jni.h>
+ #include "jni_util.h"
#include "jvm.h"
#include "management_ext.h"
#define ERR_MSG_SIZE 128
const JmmInterface* jmm_interface = NULL;
JavaVM* jvm = NULL;
jint jmm_version = 0;
JNIEXPORT jint JNICALL
! DEF_JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv* env;
jvm = vm;
if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_2) != JNI_OK) {
return JNI_ERR;
< prev index next >