Let's say I'm using xmlsec-1.5.8.jar for one part of my application (it has always used this).
Then let's say I'm adding a new feature to my application and the new feature requires the use of xmlsec-2.0.5.jar.
I don't want to replace xmlsec's usage for all the old code because I don't want to re-test all the code that has already been working (much of the code of which I don't know how it works because it was created before I arrived at this company).
Is there a way in Java to use xmlsec-1.5.8.jar classes in one part of my project and then to use xmlsec-2.0.5.jar in another part?
You need to look into class loaders.
It's pretty tricky, but here's a good explanation for you.
Java, Classpath, Classloading => Multiple Versions of the same jar/project
You'll probably have to unload the old jar, load the new jar, run whatever the new function are, then unload that newer jar and reload the older jar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With