Here you can find the source of loadClass(final File classFolder, final String className)
public static Class<?> loadClass(final File classFolder, final String className) throws MalformedURLException, ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; public class Main { public static Class<?> loadClass(final File classFolder, final String className) throws MalformedURLException, ClassNotFoundException { final ClassLoader cl = new URLClassLoader(new URL[] { classFolder.toURI().toURL() }); return Class.forName(className, false, cl); }//from w w w . j a v a 2 s. c o m }