private static void urlClassLoaderAddUrl(URLClassLoader classLoader, URL url) throws InvocationTargetException, IllegalAccessException {
        Method method = ReflectionUtils.getDeclaredMethod(classLoader, "addURL", URL.class);

        if (method == null) {
            throw new RuntimeException("can't not find declared method addURL, curr classLoader is " + classLoader.getClass());
        }
        method.setAccessible(true);
        method.invoke(classLoader, url);
    }
company: www.dtstack.com
author: toutian
create: 2019/10/14
core/src/main/java/com/dtstack/flink/sql/classloader/ClassLoaderManager.java