I have a system for which I am creating a plugin through a well defined access point. However the plugin in question uses some jar that the framework also uses but of a different version.
The code is structured in a way where the code integrating in the framework (extending the plugin extension points) and the code doing the actual work is very well decoupled (basically boils down to an API of less than 10 classes). However behind these few classes is hidden a fairly big and complex system (60+ jar dependency)
The question is as follows :
How do I ensure that anything instantiated by the API classes is done using a seperate private library of jar files ?
In other words, how to I isolate the plugin so that it runs with it's own private library without interfering with the main application's libraries ?