Multiple approaches used at the same time usually give the best results here. Different users may choose different ways to configure your application. For example:
- A default directory where users can put plugins. Or even a list of directories, which could include some subdirectory of the application folder, some system-wide directory in the platform-dependent "application data" place, some user-local directory.
- A config file with some options to control plugins search and selection.
- A Java system property which specifies a list of directories to search for plugins, like
java -Dorg.something.appname.plugindirs=plugindir1;plugindir2.
- A special command-line option or Java system property to select a particular plugin, possibly providing an absolute path or just a name to look up in the directories specified by the methods above.
I think that the more ways your application provide, the better. Of course, it should have some sort of default setup so users won't have to bother with all that stuff if they don't want to. Also, the order of using those options should be sensible: for example, it makes perfect sense for the user plugins to override the system ones, not the other way around.