public void invokeMethod(String mmethod1) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException, InstantiationException{ Class mother = m.getClass(); Object paramsObj[] = {}; Class thisClass = Class.forName(v.getName()); Object iClass = thisClass.newInstance(); try { Method method = mother.getMethod(mmethod1); method.invoke(mother, paramsObj); } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } }