Hiran
Posts: 41
Nickname: jclu
Registered: Mar, 2002
|
|
Re: Dynamic class loading
|
Posted: Jul 31, 2003 2:53 PM
|
|
Well, the classes are going to be modules that will run in their own threads. I'm planning to have a main engine that load/unloads the modules and facilitates intermodule communication. Thus, the modules can't really be based on a certain interface. What if I just had the modules implement Runnable? That way all I would need to do is have the main engine call the start method of each class.
Also, even if that's going to be the case, how exactly would I load each module? Could someone please give a basic code example, if you don't mind (since I've never played around with using ClassLoader before). I'll probably have a config file that specifies the names and paths of the classes to load. Thanks.
God bless Hiran
|
|