Code example for URLClassLoader

Methods: loadClass

0
        sb.append(System.getProperty("test.src", "."));
        sb.append(File.separatorChar);
        sb.append("test.jar");
 
        URL[] url = {new URL(sb.toString())};
        URLClassLoader cl = new URLClassLoader(url);
 
        Class type = cl.loadClass("test.Test");
        if (type == null) {
            throw new Error("could not find class test.Test");
        } 
 
 
        InputStream stream = new ByteArrayInputStream(DATA.getBytes());
 
        ExceptionListener el = new ExceptionListener() {
            public void exceptionThrown(Exception exception) {
                throw new Error("unexpected exception", exception);
            } 
        }; 
Connect your IDE to all the code out there  Get Codota for Java