at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
mirai-console (2.12.0)插件 的 class 不会加载在 BuiltinClassLoader ,而是每个插件有独立的 ClassLoader
比较简单的处理方法是
var oc = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
// do something
} finally {
Thread.currentThread().setContextClassLoader(oc);
}