Here you can find the source of classForName(String className)
public static Class<?> classForName(String className) throws ClassNotFoundException
//package com.java2s; public class Main { public static Class<?> classForName(String className) throws ClassNotFoundException { Thread t = Thread.currentThread(); ClassLoader cl = t.getContextClassLoader(); Class<?> cls = cl.loadClass(className); return cls; }//from w w w. j a v a 2s. c om }