I'm creating a small hobby Java task/todo application. I want to be able to write plugins for it, which will be stored in a directory somewhere, probably in a plugins
directory next to the myapplication.jar
.
I have some idea on how to load these plugins, and I want to write interfaces which the plugin creator can use, like SomeActionInterface
, when implemented allows the plugin to add functionality to SomeAction
.
My question is, where does that SomeActionInterface
go, and how would the plugin creator access said interface?
Does the interface go in the main myapplication.jar
which the user should have loaded on their classpath, or does it go in a separate myapplication-plugininterfaces.jar
?