获取网址类加载器
//package com.nowjava; import java.io.File; import java.net.MalformedURLException; /**来自 nowjava - 时 代 Java**/ import java.net.URL; import java.net.URLClassLoader; public class Main { public static void main(String[] argv) throws Exception { String directoryPath = "nowjava.com"; System.out.println(getUrlClassLoader(directoryPath)); } public static URLClassLoader getUrlClassLoader(String directoryPath) { // directoryPath /* n o w j a v a . c o m 提 供 */ File f = new File(directoryPath); URL url; URL[] urls = null; URLClassLoader urlClassLoader = null; try { url = f.toURI().toURL(); urls = new URL[] { url }; urlClassLoader =