我在org.classloader下面想要载入org.classloader.impl下面的Word类,红色部分中URL的参数应该怎么填?哪位大大再给解释下?
package org.classloader;import java.net.URL;
import java.net.URLClassLoader;public class HelloLoader { public static void main(String[] args) {
try {
URL u = new URL("file:/impl/");
for (int i = 0; i < 100; i++) {
Office of = (Office) new URLClassLoader(new URL[] { u })
.loadClass("Word").newInstance();
of.start();
Thread.currentThread().sleep(1000);
}
} catch (Exception e) {
e.printStackTrace(); }
}
}