jdk/src/java.base/share/native/libjava/VMSupport.c
changeset 36854 84179cb88469
parent 32839 68348f616944
--- a/jdk/src/java.base/share/native/libjava/VMSupport.c	Wed Jul 05 21:31:37 2017 +0200
+++ b/jdk/src/java.base/share/native/libjava/VMSupport.c	Sun Apr 03 16:28:41 2016 +0100
@@ -27,36 +27,17 @@
 #include "jni_util.h"
 #include "jlong.h"
 #include "jvm.h"
-#include "jdk_util.h"
 
-#include "sun_misc_VMSupport.h"
-
-typedef jobject (JNICALL *INIT_AGENT_PROPERTIES_FN)(JNIEnv *, jobject);
-
-static INIT_AGENT_PROPERTIES_FN InitAgentProperties_fp = NULL;
+#include "jdk_internal_vm_VMSupport.h"
 
 JNIEXPORT jobject JNICALL
-Java_sun_misc_VMSupport_initAgentProperties(JNIEnv *env, jclass cls, jobject props)
+Java_jdk_internal_vm_VMSupport_initAgentProperties(JNIEnv *env, jclass cls, jobject props)
 {
-    if (InitAgentProperties_fp == NULL) {
-        if (!JDK_InitJvmHandle()) {
-            JNU_ThrowInternalError(env,
-                 "Handle for JVM not found for symbol lookup");
-            return NULL;
-        }
-        InitAgentProperties_fp = (INIT_AGENT_PROPERTIES_FN)
-            JDK_FindJvmEntry("JVM_InitAgentProperties");
-        if (InitAgentProperties_fp == NULL) {
-            JNU_ThrowInternalError(env,
-                 "Mismatched VM version: JVM_InitAgentProperties not found");
-            return NULL;
-        }
-    }
-    return (*InitAgentProperties_fp)(env, props);
+    return JVM_InitAgentProperties(env, props);
 }
 
 JNIEXPORT jstring JNICALL
-Java_sun_misc_VMSupport_getVMTemporaryDirectory(JNIEnv *env, jclass cls)
+Java_jdk_internal_vm_VMSupport_getVMTemporaryDirectory(JNIEnv *env, jclass cls)
 {
     return JVM_GetTemporaryDirectory(env);
 }