Here you can find the source of classForName(String className)
public static Class<?> classForName(String className)
//package com.java2s; //License from project: Apache License public class Main { public static Class<?> classForName(String className) { try {//w ww . j av a 2 s .c o m return Class.forName(className, false, Thread.currentThread().getContextClassLoader()); } catch (Exception ignore) { try { return Class.forName(className); } catch (Exception e) { throw new IllegalArgumentException("classForName(" + className + ") with ex:", e); } } } }