I have 2 versions of jar file (plugins1.0.jar and plugins2.0,jar) in same folder and trying to load Class from these jar files dynamically using URLClassloader.
I want to ensure that the class should be loaded from latest version of jar file.
How can i achieve this ?
Thanks in advance
You will need to construct your list of urls in such a way that
plugins2.0.jaroccurs beforeplugins1.0.jar. But generally it’s a bad idea as other classes may have conflicting versions loaded.From Java docs