Java Class Loader loadClass(final File classFolder, final String className)

Here you can find the source of loadClass(final File classFolder, final String className)

Description

load Class

License

Apache License

Declaration

public static Class<?> loadClass(final File classFolder, final String className)
            throws MalformedURLException, ClassNotFoundException 

Method Source Code

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

import java.io.File;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;

public class Main {
    public static Class<?> loadClass(final File classFolder, final String className)
            throws MalformedURLException, ClassNotFoundException {
        final ClassLoader cl = new URLClassLoader(new URL[] { classFolder.toURI().toURL() });

        return Class.forName(className, false, cl);
    }//from  w w w  .  j  a v  a  2 s.  c  o  m
}

Related

  1. load(String path, String className)
  2. loadAllAutoConfigFiles(ClassLoader classloader)
  3. loadArrayClass(ClassLoader cl, String aName)
  4. loadClass(ClassLoader cl, String cName)
  5. loadClass(final File baseFolder, final String qualifiedType)
  6. loadClass(String className)
  7. loadClass(String className)
  8. loadClass(String dir, String classname)
  9. loadClass(String name)