Issue
I'm going through one confusion. where I'm using 2 external jars (one.jar, two.jar) in my maven java project.
one.jar
calls/use two.jar
as a dependency. If two.jar
version was lets say 1.1.1
while building up one.jar
, so will it work if I import both jars in my code to use and rename two.jar to 1.1.2 version ? Would one.jar would be able to find two.jar with different name ?
Want to know, will name change of jar could be found to by its caller ?
Solution
At runtime it doesn't work like that. It's not like that one jar will try to find another jar. Or specific version of the jar. It's class which try to find and load another class to resolve the dependencies.
If updated version of jar has backward compatibility, you won't face any issue, otherwise you might face some runtime issues. For that you might need to read the release notes of the jar and try to find how it might impact the jar which is using it.
Answered By - Gaurav Jeswani