src/share/native/sun/misc/VMSupport.c

Print this page
rev 9799 : Backed out changeset 2b5b8d82173e


  36 static INIT_AGENT_PROPERTIES_FN InitAgentProperties_fp = NULL;
  37 
  38 JNIEXPORT jobject JNICALL
  39 Java_sun_misc_VMSupport_initAgentProperties(JNIEnv *env, jclass cls, jobject props)
  40 {
  41     if (InitAgentProperties_fp == NULL) {
  42         if (!JDK_InitJvmHandle()) {
  43             JNU_ThrowInternalError(env,
  44                  "Handle for JVM not found for symbol lookup");
  45         }
  46         InitAgentProperties_fp = (INIT_AGENT_PROPERTIES_FN)
  47             JDK_FindJvmEntry("JVM_InitAgentProperties");
  48         if (InitAgentProperties_fp == NULL) {
  49             JNU_ThrowInternalError(env,
  50                  "Mismatched VM version: JVM_InitAgentProperties not found");
  51             return NULL;
  52         }
  53     }
  54     return (*InitAgentProperties_fp)(env, props);
  55 }
  56 
  57 JNIEXPORT jstring JNICALL
  58 Java_sun_misc_VMSupport_getVMTemporaryDirectory(JNIEnv *env, jclass cls)
  59 {
  60     return JVM_GetTemporaryDirectory(env);
  61 }


  36 static INIT_AGENT_PROPERTIES_FN InitAgentProperties_fp = NULL;
  37 
  38 JNIEXPORT jobject JNICALL
  39 Java_sun_misc_VMSupport_initAgentProperties(JNIEnv *env, jclass cls, jobject props)
  40 {
  41     if (InitAgentProperties_fp == NULL) {
  42         if (!JDK_InitJvmHandle()) {
  43             JNU_ThrowInternalError(env,
  44                  "Handle for JVM not found for symbol lookup");
  45         }
  46         InitAgentProperties_fp = (INIT_AGENT_PROPERTIES_FN)
  47             JDK_FindJvmEntry("JVM_InitAgentProperties");
  48         if (InitAgentProperties_fp == NULL) {
  49             JNU_ThrowInternalError(env,
  50                  "Mismatched VM version: JVM_InitAgentProperties not found");
  51             return NULL;
  52         }
  53     }
  54     return (*InitAgentProperties_fp)(env, props);
  55 }