6864028: Update the java launcher to use the new entry point JVM_FindClassFromBootLoader
Update the java launcher to use the new entry point JVM_FindClassFromBootLoader Reviewed-by: ksrini
This commit is contained in:
parent
0f923041b9
commit
fb688547c4
@ -187,9 +187,6 @@ void InitLauncher(jboolean javaw);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
|
typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
|
||||||
const char *name,
|
const char *name));
|
||||||
jboolean init,
|
|
||||||
jobject loader,
|
|
||||||
jboolean throwError));
|
|
||||||
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
|
jclass FindBootStrapClass(JNIEnv *env, const char *classname);
|
||||||
#endif /* _JAVA_H_ */
|
#endif /* _JAVA_H_ */
|
||||||
|
@ -1324,12 +1324,12 @@ FindBootStrapClass(JNIEnv *env, const char* classname)
|
|||||||
{
|
{
|
||||||
if (findBootClass == NULL) {
|
if (findBootClass == NULL) {
|
||||||
findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
|
findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
|
||||||
"JVM_FindClassFromClassLoader");
|
"JVM_FindClassFromBootLoader");
|
||||||
if (findBootClass == NULL) {
|
if (findBootClass == NULL) {
|
||||||
JLI_ReportErrorMessage(DLL_ERROR4,
|
JLI_ReportErrorMessage(DLL_ERROR4,
|
||||||
"JVM_FindClassFromClassLoader");
|
"JVM_FindClassFromBootLoader");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
|
return findBootClass(env, classname);
|
||||||
}
|
}
|
||||||
|
@ -1093,12 +1093,6 @@ void SetJavaLauncherPlatformProps() {}
|
|||||||
*/
|
*/
|
||||||
static FindClassFromBootLoader_t *findBootClass = NULL;
|
static FindClassFromBootLoader_t *findBootClass = NULL;
|
||||||
|
|
||||||
#ifdef _M_AMD64
|
|
||||||
#define JVM_BCLOADER "JVM_FindClassFromClassLoader"
|
|
||||||
#else
|
|
||||||
#define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
|
|
||||||
#endif /* _M_AMD64 */
|
|
||||||
|
|
||||||
jclass FindBootStrapClass(JNIEnv *env, const char *classname)
|
jclass FindBootStrapClass(JNIEnv *env, const char *classname)
|
||||||
{
|
{
|
||||||
HMODULE hJvm;
|
HMODULE hJvm;
|
||||||
@ -1108,13 +1102,13 @@ jclass FindBootStrapClass(JNIEnv *env, const char *classname)
|
|||||||
if (hJvm == NULL) return NULL;
|
if (hJvm == NULL) return NULL;
|
||||||
/* need to use the demangled entry point */
|
/* need to use the demangled entry point */
|
||||||
findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
|
findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
|
||||||
JVM_BCLOADER);
|
"JVM_FindClassFromBootLoader");
|
||||||
if (findBootClass == NULL) {
|
if (findBootClass == NULL) {
|
||||||
JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
|
JLI_ReportErrorMessage(DLL_ERROR4, "JVM_FindClassFromBootLoader");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
|
return findBootClass(env, classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user