class JVMUtil {

    public static boolean appendToClassPath(String name) {
        if (!FileUtil.exist(name)) {
            return false;
        }

        try {
            ClassLoader clsLoader = ClassLoader.getSystemClassLoader();
            Method appendToClassPathMethod =
                    clsLoader.getClass().getDeclaredMethod("appendToClassPathForInstrumentation", String.class);

            if (null != appendToClassPathMethod) {
                appendToClassPathMethod.setAccessible(true);
                appendToClassPathMethod.invoke(clsLoader, name);
            }

            return true;
        } catch (Exception e) {
            throw ExceptionUtil.toRuntimeException(e);
        }
    }

}