Here you can find the source of loadClass(String className)
public static Class<?> loadClass(String className) throws RuntimeException
//package com.java2s; //License from project: Open Source License public class Main { public static Class<?> loadClass(String className) throws RuntimeException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); return loadClass(className, cl); }/*from w w w. j ava 2 s .co m*/ public static Class<?> loadClass(String className, ClassLoader cl) throws RuntimeException { if (cl == null) { return loadClass(className); } Class<?> clazz; try { clazz = cl.loadClass(className); } catch (ClassNotFoundException e) { throw new RuntimeException("Error loading class [" + className + "]", e); } return clazz; } }