BugFix: fix getClassBytesByName cannot get class in some environments

This commit is contained in:
xiaozhou233 committed 2026-08-25 20:32:56 +08:00
1 parent 41049f1852
commit 55303b7dc9
1 file changed
+1 -1
+1 -1
View File
@@ -108,7 +108,7 @@ JNIEXPORT jbyteArray JNICALL Java_cn_xiaozhou233_juiceagent_api_JuiceAgent_getCl
std::string internalName = dottedToInternal(utf);
env->ReleaseStringUTFChars(name, utf);
jclass clazz = env->FindClass(internalName.c_str());
jclass clazz = findLoadedClass(agent.getJVMTI(), env, internalName);
if (!clazz) {
if (env->ExceptionCheck()) env->ExceptionClear();
spdlog::error("[bytecode] Class not found: {}", internalName);