Taken From : Zak Nixon
Is there anyway to "legally" change the Java classpath
during program execution? Or some way to tell the JDK classloader
where to look for user specified files ?
No you cannot change the classpath dynamically with System.setProperty("java.class.path",newClassPath).
The way to achieve the effect is to create a java.net.URLClassLoader with the extra paths that you want to be searched during runtime.
HTH,
Arjun K