Java Class Load loadClass(String className, ClassLoader classLoader)

Here you can find the source of loadClass(String className, ClassLoader classLoader)

Description

load Class

License

Apache License

Parameter

Parameter Description
className a parameter
classLoader a parameter

Declaration

public static Class<?> loadClass(String className, ClassLoader classLoader) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from   w  ww  .j  a v a2  s  . com
     * 
     * @param className
     * @param classLoader
     * @return
     */
    public static Class<?> loadClass(String className, ClassLoader classLoader) {
        try {
            return classLoader.loadClass(className);
        } catch (Exception e) {
            throw new IllegalArgumentException("loadClass(" + className + ")  with ex:", e);
        }
    }
}

Related

  1. loadClass(String className, Class targetType, ClassLoader cl)
  2. loadClass(String className, Class type)
  3. loadClass(String className, ClassLoader cl)
  4. loadClass(String className, ClassLoader classLoader)
  5. loadClass(String className, ClassLoader classLoader)
  6. loadClass(String clazz, ClassLoader cl)
  7. loadClass(String fqcn, Class... classes)
  8. loadClass(String h, String prefix)
  9. loadClass(String inClassName)