From 5cc286228708c4b5fff25e7e8847e053816e32fc Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Wed, 2 Apr 2014 23:23:00 +0100 Subject: [PATCH] 8039118: Windows build failure (j2pcsc.dll : fatal error unresolved external symbol throwByName) Reviewed-by: mullan, mchung, alanb --- jdk/src/share/native/sun/security/smartcardio/pcsc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/native/sun/security/smartcardio/pcsc.c b/jdk/src/share/native/sun/security/smartcardio/pcsc.c index 9215a82c58c..8c33f2a03d2 100644 --- a/jdk/src/share/native/sun/security/smartcardio/pcsc.c +++ b/jdk/src/share/native/sun/security/smartcardio/pcsc.c @@ -64,10 +64,12 @@ #define J2PCSC_EXCEPTION_NAME "sun/security/smartcardio/PCSCException" -extern void throwByName(JNIEnv *, const char *, const char *); - void throwOutOfMemoryError(JNIEnv *env, const char *msg) { - throwByName(env, "java/lang/OutOfMemoryError", msg); + jclass cls = (*env)->FindClass(env, "java/lang/OutOfMemoryError"); + + if (cls != NULL) /* Otherwise an exception has already been thrown */ + (*env)->ThrowNew(env, cls, msg); + } void throwPCSCException(JNIEnv* env, LONG code) {