package opencv;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class TestClassLoad {
public static void main(String[] args) throws Exception {
Class clz = Class.forName("opencv.A");
Object object = clz.newInstance();
Method method = clz.getDeclaredMethod("hello", null);
method.invoke(object);
}
}
class A{
public void hello(){
System.out.println("hellow world!");
}
}