Why java newInstance hang at getDeclaredConstructors0?
问题 We use mozlia rhino to generate dynamic class, then load JsClass by custom classloader like this DynamicClassLoader loader = new DynamicClassLoader(JavaScriptFactory.class.getClassLoader()); Class<?> jsClass = loader.loadClass("D://","com.huawei.xxx"); jsClass.newInstance(); As you see, every JsClass have a seperate classloader, when user modify js, we will also reload JsClass by this code, Now, we face a problem, when call jsClass.newInstance(), some thread hang at getDeclaredConstructors0