If you were wondering how to dynamically load a class based on some configuration or settings file, then ypou might be able to solve your problem using Java Reflection and Properties.
The Properties file are basically a collection of key-value pairs. It is one of the most commonly used mechanism for storing applications configuration data and settings.
Reflection is a feature available in Java used by developers for examining and modifying the run-time behavior of applications running in the JVM.
Click here to read the full article and download complete source code.