I want to allow users to write their own plugins for my application. The usage is quite simple, after the application has started it searches some file system path for jar files and loads all of them. All jars are dependant on my PluginFramework I released to customers.
Now, questions:
- Is it possible to add the PluginFramework version the plugin's jar Manifest file and validate it from code?
- If some plugins share the same class name (and package of course), can I load them in the same class loader or do I need to create a different class loader for every plugin?
- Can the plugin classes(which were loaded by a custom classloader) access classes loaded by the main class loader? PluginFramework classes should be shared among all plugins.
- Is there a way to unload all classes loaded by a specific class loader?
Thanks.