How to load modules in Java
- by gerardorn
I'm building a server that loads modules. Each module is a .jar file. Inside the jar there's all the classes that the module needs. The server needs to read the jar, find the main class (it doesnt have the main method on it is just the class that makes the module work but not as a different program), build an object of that class and store it in a vector of modules so that it can acces to a specific module depending on the job to be done.
How can I do that?
As far as the server, it is listening and receiving request, but there's no modules to delegate the job to, since my vector of modules is empty.