Refactor & Impl: JuiceAgent and init function and AddToClassLoader

This commit is contained in:
xiaozhou233 committed 2026-04-01 10:19:40 +08:00
1 parent bad147d898
commit 34cb16d385
6 files changed
+195

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#pragma once
#include <libagent.hpp>
inline bool check_env(JuiceAgent::Agent& agent) {
if (agent.get_jvm() == nullptr) {
PLOGE << "Failed to get JavaVM instance";
return false;
}
if (agent.get_jvmti() == nullptr) {
PLOGE << "Failed to get JVMTI environment";
return false;
}
return true;
}