Java tutorial
//package com.java2s; import java.lang.reflect.Constructor; public class Main { private static Object getInstance(String name, Class<?> classParas[], Object paras[]) { Object o = null; try { Class<?> c = Class.forName(name); Constructor<?> con = c.getConstructor(classParas); o = con.newInstance(paras); } catch (Exception ex) { } return o; } }