Add the given URL to the system class loader.

Note that this method uses reflection to change the visibility of the URLClassLoader.addURL() method. This will
fail if a security manager forbids it.

@param url
545737
public void add(URL url) {
		URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
		Class sysClass = URLClassLoader.class;

		try {
			Method method = sysClass.getDeclaredMethod("addURL", URL.class);
			method.setAccessible(true);
			method.invoke(sysLoader, new Object[]{ url });
		} catch (InvocationTargetException e) {
			throw new JarLoadingException(e);
		} catch (NoSuchMethodException e) {
			throw new JarLoadingException(e);
		} catch (IllegalAccessException e) {
			throw new JarLoadingException(e);
		}
	}
1028189
public static void addToClasspath(final URL url, final ClassLoader classLoader) {
        checkNotNull("url", url);
        checkNotNull("classLoader", classLoader);
        if (!(classLoader instanceof URLClassLoader)) {
            throw new IllegalArgumentException("Cannot add '" + url + "' to classloader because it's not an URL classloader");
        }
        final URLClassLoader urlClassLoader = (URLClassLoader) classLoader;
        if (!containsURL(urlClassLoader.getURLs(), url)) {
            try {

                final Method addURL = URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { URL.class });
                addURL.setAccessible(true);
                addURL.invoke(urlClassLoader, new Object[] { url });
            } catch (final NoSuchMethodException e) {
                throw new RuntimeException(e);
            } catch (final IllegalArgumentException e) {
                throw new RuntimeException(e);
            } catch (final IllegalAccessException e) {
                throw new RuntimeException(e);
            } catch (final InvocationTargetException e) {
                throw new RuntimeException(e);
            }
        }
    }
968082
public void setImageUrl(final String imageUrl) {
		ImageModel model = getOrCreateComponentModel();
		model.imageUrl = imageUrl;
		model.image = null;
	}
734590
public void setSiteUrl(String siteUrl) {
        this.siteUrl = StringUtils.isBlank(siteUrl) ? new ServerSiteUrlConfig() : new ServerSiteUrlConfig(siteUrl);
    }
1108364
public void setUrl( CharSequence url) {
		if ( url != null) format.getHeader().createEntry( URL, url);
	}
1079509
public static void addOrigHeader(HttpServletResponse response, String url) {
		response.setHeader(LINK, makeLink(url, ORIGINAL));
	}
478856
public void addFile(
        String loaderPath,
        URL file
    ) {
        List list = (List) filesMap.get(loaderPath);

        if (list == null) {
            list = new ArrayList();
            filesMap.put(
                loaderPath,
                list
            );
        }

        list.add(file);
    }
1167188
def add_url(self, *args, **kwargs):
        
        if len(args) == 1 and not kwargs and isinstance(args[0], UrlEntry):
            self.urls.append(args[0])
        else:
            self.urls.append(UrlEntry(*args, **kwargs))
1350752
protected static Properties loadConfig(URL url) {
    InputStream is = null;
    try {
      URLConnection connection = url.openConnection();
      if(connection instanceof HttpURLConnection) {
        HttpURLConnection conn = (HttpURLConnection)connection;
        conn.setConnectTimeout(5000);
        conn.setReadTimeout(5000);        
      }
      is = connection.getInputStream();
      return loadConfig(url.toString(), is);     
    } catch (Exception ex) {
      ex.printStackTrace(System.err);
      throw new IllegalArgumentException("Failed to load configuration from [" + url + "]", ex);
    }finally {
      if(is!=null) try { is.close(); } catch (Exception ex) { /* No Op */ }
    }
  }
863736
public void addUrl(String url) {
		if (url != null && !url.isEmpty()) {
			renderer.addUrl(url);
		}
	}
915950
public void addReadUrl(String url) {        
        
        //
        // Only cache the url data if logging is enabled.
        //
        
        if (readUrlLoggingEnabled == false) {
            return;
        }
        
        //
        // Strip off the query parameters.
        //
        
        int paramIndex = url.indexOf('?');
        String filteredUrl = url;
        if (paramIndex != -1) {
            filteredUrl = url.substring(0, paramIndex);
        }

        //
        // Because Cache doesn't take advantage of the underlying concurrentMap, this code either has to (1)introduce 
        // sync block to synchronize addReadUrl requests which would negatively impact all templates calling addReadUrl
        // or (2) accept potential race condition during the first add call on the same Url. This implementation takes
        // (2) approach as this feature is more for reporting and hence not worth the performance degradation . Also, 
        // once the first record is added to the map, the race condition no longer exists due to the use of atomic 
        // variable.
        //        
        
        AtomicLong count = (AtomicLong)__UrlMap.get(filteredUrl);
        if (count == null) {
            count = new AtomicLong(1);
            __UrlMap.put(filteredUrl, count);
        }
        else {
            count.incrementAndGet();
        }        
    }
278808
public void addServlet(final WebAppServlet servlet) {
		NullArgumentException.validateNotNull(servlet, "Servlet");
		NullArgumentException.validateNotNull(servlet.getServletName(),
				"Servlet name");
		if (servlet instanceof WebAppJspServlet) {
			NullArgumentException.validateNotNull(
					((WebAppJspServlet) servlet).getJspPath(), "JSP-path");
		} else {
			NullArgumentException.validateNotNull(
					servlet.getServletClassName(), "Servlet class");
		}
		servlets.put(servlet.getServletName(), servlet);
		// add aliases for servlet mappings added before servlet
		for (WebAppServletMapping mapping : getServletMappings(servlet
				.getServletName())) {
			servlet.addUrlPattern(mapping.getUrlPattern());
		}
	}
1330518
public ApplicationResource addCssUrl(final String url) {
		if (Util.empty(url)) {
			throw new IllegalArgumentException("A URL must be provided.");
		}
		ApplicationResource res = new ApplicationResource(url);
		addCssResource(res);
		return res;
	}
507641
public void addClassLoader(final ClassLoader classLoader) {
        if (this.addedClassLoaders == null) {
            this.addedClassLoaders = new ArrayList<>();
        }
        if (classLoader != null) {
            this.addedClassLoaders.add(classLoader);
        }
    }
295475
@PublicAPI(usage = ACCESS)
    public JavaClasses importUrl(URL url) {
        return importUrls(singletonList(url));
    }
766417
public boolean load(UrlResource urlResource) {
		if (urlResource == null) {
			throw new NullPointerException("Null setting url define!");
		}
		log.debug("Load setting file [{}]", urlResource);
		InputStream settingStream = null;
		try {
			settingStream = urlResource.getStream();
			load(settingStream);
		} catch (Exception e) {
			log.error(e, "Load setting error!");
			return false;
		} finally {
			IoUtil.close(settingStream);
		}
		return true;
	}
196948
private Class createClass(String className) throws ClassNotFoundException {
        Class clazz;
        try {
            URLClassLoader classLoader = URLClassLoader.newInstance(new URL[]{root.toURI().toURL()});
            if (log.isDebugEnabled()) {
                log.debug("Classloader URLs:");
                for (URL url : classLoader.getURLs()) {
                    log.debug("  " + url.toString());
                }
            }

            clazz = Class.forName(className, true, classLoader);
            return clazz;

        } catch (MalformedURLException mue) {
            String info = "Could not load the " + description + " object " + className
                    + ". Malformed URL: ";
            info += mue.getMessage();
            throw new ClassNotFoundException(info, mue);

        } catch (ExceptionInInitializerError eiie) {
            String info = "Could not load the " + description + " object " + className
                    + ". Could not initialize static object in server: ";
            info += eiie.getMessage();
            throw new ClassNotFoundException(info, eiie);

        } catch (LinkageError le) {
            String info = "Could not load the " + description + " object " + className
                    + ". This object is depending on a class that has been changed after compilation ";
            info += "or a class that was not found: ";
            info += le.getMessage();
            throw new ClassNotFoundException(info, le);

        } catch (ClassNotFoundException cnfe) {
            String info = "Could not find the " + description + " object " + className + ": ";
            info += cnfe.getMessage();
            throw new ClassNotFoundException(info, cnfe);
        }
    }