jar - How can I use two versions of the same library in the same project in Java? -
this question has answer here:
let's i'm using xmlsec-1.5.8.jar 1 part of application (it has used this).
then let's i'm adding new feature application , new feature requires use of xmlsec-2.0.5.jar.
i don't want replace xmlsec's usage old code because don't want re-test code has been working (much of code of don't know how works because created before arrived @ company).
is there way in java use xmlsec-1.5.8.jar classes in 1 part of project , use xmlsec-2.0.5.jar in part?
you need class loaders.
it's pretty tricky, here's explanation you.
java, classpath, classloading => multiple versions of same jar/project
you'll have unload old jar, load new jar, run whatever new function are, unload newer jar , reload older jar.
Comments
Post a Comment