1.1 --- a/src/os/linux/launcher/java.c Mon Oct 06 11:39:34 2008 -0700 1.2 +++ b/src/os/linux/launcher/java.c Wed Oct 08 08:10:51 2008 -0700 1.3 @@ -1110,7 +1110,7 @@ 1.4 if (propname) { 1.5 jclass cls; 1.6 jmethodID mid; 1.7 - NULL_CHECK0 (cls = (*env)->FindClass(env, "java/lang/System")); 1.8 + NULL_CHECK0 (cls = FindBootStrapClass(env, "java/lang/System")); 1.9 NULL_CHECK0 (mid = (*env)->GetStaticMethodID( 1.10 env, cls, 1.11 "getProperty", 1.12 @@ -1125,7 +1125,7 @@ 1.13 static jboolean isEncodingSupported(JNIEnv *env, jstring enc) { 1.14 jclass cls; 1.15 jmethodID mid; 1.16 - NULL_CHECK0 (cls = (*env)->FindClass(env, "java/nio/charset/Charset")); 1.17 + NULL_CHECK0 (cls = FindBootStrapClass(env, "java/nio/charset/Charset")); 1.18 NULL_CHECK0 (mid = (*env)->GetStaticMethodID( 1.19 env, cls, 1.20 "isSupported", 1.21 @@ -1161,7 +1161,7 @@ 1.22 #else 1.23 if (isEncodingSupported(env, enc) == JNI_TRUE) { 1.24 #endif 1.25 - NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String")); 1.26 + NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String")); 1.27 NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>", 1.28 "([BLjava/lang/String;)V")); 1.29 str = (*env)->NewObject(env, cls, mid, ary, enc); 1.30 @@ -1172,7 +1172,7 @@ 1.31 the encoding name, in which the StringCoding class will 1.32 pickup the iso-8859-1 as the fallback converter for us. 1.33 */ 1.34 - NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String")); 1.35 + NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String")); 1.36 NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>", 1.37 "([B)V")); 1.38 str = (*env)->NewObject(env, cls, mid, ary); 1.39 @@ -1195,7 +1195,7 @@ 1.40 jarray ary; 1.41 int i; 1.42 1.43 - NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String")); 1.44 + NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String")); 1.45 NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0)); 1.46 for (i = 0; i < strc; i++) { 1.47 jstring str = NewPlatformString(env, *strv++); 1.48 @@ -1224,6 +1224,7 @@ 1.49 c = *t++; 1.50 *s++ = (c == '.') ? '/' : c; 1.51 } while (c != '\0'); 1.52 + // use the application class loader for main-class 1.53 cls = (*env)->FindClass(env, buf); 1.54 free(buf); 1.55 1.56 @@ -1250,7 +1251,7 @@ 1.57 jobject jar, man, attr; 1.58 jstring str, result = 0; 1.59 1.60 - NULL_CHECK0(cls = (*env)->FindClass(env, "java/util/jar/JarFile")); 1.61 + NULL_CHECK0(cls = FindBootStrapClass(env, "java/util/jar/JarFile")); 1.62 NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "<init>", 1.63 "(Ljava/lang/String;)V")); 1.64 NULL_CHECK0(str = NewPlatformString(env, jarname)); 1.65 @@ -1471,7 +1472,7 @@ 1.66 jclass ver; 1.67 jmethodID print; 1.68 1.69 - NULL_CHECK(ver = (*env)->FindClass(env, "sun/misc/Version")); 1.70 + NULL_CHECK(ver = FindBootStrapClass(env, "sun/misc/Version")); 1.71 NULL_CHECK(print = (*env)->GetStaticMethodID(env, ver, "print", "()V")); 1.72 1.73 (*env)->CallStaticVoidMethod(env, ver, print);