hotspot/src/os/solaris/launcher/java_md.c
Print this page
rev 611 : Merge
*** 1,7 ****
/*
! * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 1824,1828 ****
--- 1824,1849 ----
int
UnsetEnv(char *name)
{
return(borrowed_unsetenv(name));
}
+
+ /*
+ * The implementation for finding classes from the bootstrap
+ * class loader, refer to java.h
+ */
+ static FindClassFromBootLoader_t *findBootClass = NULL;
+
+ jclass
+ FindBootStrapClass(JNIEnv *env, const char* classname)
+ {
+ if (findBootClass == NULL) {
+ findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,
+ "JVM_FindClassFromBootLoader");
+ if (findBootClass == NULL) {
+ fprintf(stderr, "Error: could not load method JVM_FindClassFromBootLoader");
+ return NULL;
+ }
+ }
+ return findBootClass(env, classname, JNI_FALSE);
+ }
+