Here you can find the source of classForName(String name)
public static Class classForName(String name) throws ClassNotFoundException
//package com.java2s; public class Main { public static Class classForName(String name) throws ClassNotFoundException { try {//from www. j av a 2s . c o m ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { return contextClassLoader.loadClass(name); } } catch (Throwable ignore) { } return Class.forName(name); } }