R
Ross
What are the best strategies for creating a Java application with a
plugin architecture.
My current plan is to have a directory of plugins, to read the files
manually, use ClassLoader.defineClass to create the class file,
Class.newInstance() to make one, and of course a number of interfaces
that plugins can implement, one for each plugin type.
Are there any better strategies that people would recommend? I don't
want to add the plugin directory to the classpath, as that would make
installation of the software more tricky than just putting a .jar file
somewhere and double clicking on it.
plugin architecture.
My current plan is to have a directory of plugins, to read the files
manually, use ClassLoader.defineClass to create the class file,
Class.newInstance() to make one, and of course a number of interfaces
that plugins can implement, one for each plugin type.
Are there any better strategies that people would recommend? I don't
want to add the plugin directory to the classpath, as that would make
installation of the software more tricky than just putting a .jar file
somewhere and double clicking on it.