private Object instantiate(String className, String jarFile) throws InstantiationException,
      IllegalAccessException, ClassNotFoundException, MalformedURLException {
    Object object = null;
    if (jarFile == null) {
      object = Class.forName(className).newInstance();
    } else {
      URLClassLoader classLoader = URLClassLoader.newInstance(
          new URL[] {new File(jarFile).toURI().toURL()}, TestManager.class.getClassLoader());
      Thread.currentThread().setContextClassLoader(classLoader);
      object = classLoader.loadClass(className).newInstance();
    }
    return object;
  }
Instantiate.

@param className the class name
@param jarFile the jar file
@return the object
@throws InstantiationException the instantiation exception
@throws IllegalAccessException the illegal access exception
@throws ClassNotFoundException the class not found exception
@throws MalformedURLException the malformed URL exception
KITE-Engine/src/main/java/org/webrtc/kite/TestManager.java