This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Is there a way to pass constructor parameters when dynamically loading a class ? ie Class.forName() The class I am trying to load is related to a database table. Does anyone know if using JDO is a better alternative to dynamically loading a class ? (.. or am I completely off the track here ?)
Steve Deadsea
Ranch Hand
Joined: Dec 03, 2001
Posts: 125
posted
0
Use the Class.getConstructor(Class[] parameterTypes) method and then get a new instance from that Constructor using Constructor.newInstance(Object[] initargs)