posted 15 years ago
I have a dao need to call some 3th Party jar, at firstly I import these class run successfully, But now they have pubished over 2 version, basically these version have the same package and class and both have a interface being support to me, so my problem is I want choose the different version at run-time ON every call. any have good Solutions. i don't want change some existing code.
maybe i have own classloader to load the jar is better, but I have using "import" the needed interface, how to change is impossible using own classloader. meanwhile, any call i need load the jar before run and unload all class which have load to jvm after finised?