package com.krishagni.catissueplus.core.common.util;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;

public class ClassPathUtil {
	
	public static void addFile(File f) 
	throws IOException {
		addURL(f.toURI().toURL());
	}

	public static void addURL(URL u) 
	throws IOException {
		ClassLoader loader = ClassPathUtil.class.getClassLoader();
		URLClassLoader systemClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
		Class<URLClassLoader> urlLoaderCls = URLClassLoader.class;

		try {
			Method method = urlLoaderCls.getDeclaredMethod(
				"addURL",
				new Class<?>[] { URL.class });
			method.setAccessible(true);
			method.invoke(systemClassLoader, new Object[] { u });
		} catch (Throwable t) {
			throw new IOException("Error, could not add URL to classloader: " + u);
		}
	}
}
@@ -428,98 +428,8 @@
 ();%0A
-%09%09URLClassLoader systemClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();%0A
 %09%09Cl
@@ -646,20 +646,9 @@
 oke(
-systemClassL
+l
 oade

Revert changes