diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp index 4e06d12aee..aaa75c0fb8 100644 --- a/src/corelib/kernel/qjni.cpp +++ b/src/corelib/kernel/qjni.cpp @@ -74,7 +74,8 @@ static jclass getCachedClass(JNIEnv *env, const char *className) if (!classLoader.isValid()) return 0; - QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(QLatin1String(className)); + QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(QString::fromLatin1(className).replace(QLatin1Char('/'), + QLatin1Char('.'))); QJNIObjectPrivate classObject = classLoader.callObjectMethod("loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", stringName.object());