I have two versions of a dependence java library in a small part of a really
big java spring project that I really have to use in combination for some time, however:
-the new version is not backward compatible with the older one
-both versions use the same class uris
Thus, I ended up trying to instatiate both library versions separately somehow because the default class loader keeps keeping the first instance and things are going crazy. I searched a little for some hours, many people recommend OSGi but I don’t want to integrate all that framework just for this little. Also, I tried jarjar via maven but I didn’s seem to work for the target dependency jars (I think they are obfuscated anyway). So, I am trying to simply instatiate a separate ClassLoader that can do the trick. Any of you know any trivial way to do that?
Nevermind, problem fixed the easy way.
I contacted the library authors and they refactored their old version package for me .
So no class loader hacks needed anymore 🙂