Plugin interface implementation

What's a good way to add a plugin interface so that you can have optional components?

I know the Class.forName () approach (with JDBC for example), but there is also such an approach to dynamically loading a class .

+2


a source to share


1 answer


You can take a look at this: http://jpf.sourceforge.net/ .



A good approach would be to load the jar files into the specified directory at runtime and see if they contain plugin classes. Have a look at this: How to load a jar file at runtime .

+2


a source







All Articles