mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
use ext classloader to try load SpyAPI. #1596
This commit is contained in:
+4
-1
@@ -12,7 +12,10 @@ import com.alibaba.bytekit.agent.inst.InstrumentApi;
|
||||
public abstract class ClassLoader_Instrument {
|
||||
public Class<?> loadClass(String name) throws ClassNotFoundException {
|
||||
if (name.startsWith("java.arthas.")) {
|
||||
return ClassLoader.getSystemClassLoader().loadClass(name);
|
||||
ClassLoader extClassLoader = ClassLoader.getSystemClassLoader().getParent();
|
||||
if (extClassLoader != null) {
|
||||
return extClassLoader.loadClass(name);
|
||||
}
|
||||
}
|
||||
|
||||
Class clazz = InstrumentApi.invokeOrigin();
|
||||
|
||||
Reference in New Issue
Block a user