mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
- Add test JVM sources (Loop, Target) and API tests (AddToBootstrap/SystemClassLoaderSearch, AddToClassLoader, GetClassByName, GetLoadedClasses) - Add injection module (Injection jar) for classloader tests - Add copy-bin.bat to refresh resources/ from build output - Remove obsolete java-loop/java-system-load tests - Ignore IDE dirs and resources/ build artifacts
18 lines
511 B
Java
18 lines
511 B
Java
import cn.xiaozhou233.juiceagent.api.JuiceAgent;
|
|
|
|
import java.io.File;
|
|
import java.util.Arrays;
|
|
|
|
public class GetClassByName {
|
|
public static void main(String[] args) {
|
|
System.load(new File("resources/libagent.dll").getAbsolutePath());
|
|
JuiceAgent.init("");
|
|
|
|
Class<?> clazz = JuiceAgent.getClassByName("java.lang.String");
|
|
|
|
System.out.println(clazz);
|
|
System.out.println(clazz.getName());
|
|
System.out.println(Arrays.toString(clazz.getDeclaredMethods()));
|
|
}
|
|
}
|