public static Object createInstanceAndCallStaticMethod(Configuration config,String className,String methodName) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
  DexClassLoader dcl=createInstance(config);
  Class c=dcl.loadClass(className);
  Method m=c.getMethod(methodName,(Class[])null);
  return m.invoke(null,(Object[])null);
}

public static Object createInstanceAndCallStaticMethod ( Configuration config , String className , String methodName ) throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException { DexClassLoader dcl = createInstance ( config ) ; Class c = dcl . loadClass ( className ) ; Method m = c . getMethod ( methodName , ( Class [ ] ) null ) ; return m . invoke ( null , ( Object [ ] ) null ) ; }
helper to construct an instance to test , using the jar file as the source , and call a named no - argument static method on a named class .
