Which Version will be used ?

Hi All,If there are two jars in WEB_INF/lib directory, which one will be used. For exampled there is A.0.1.jar & A.0.4.jar (Different versions) & if the application needs a class file which is present in both jars then which jar will be used ?Thanks-Arun
[290 byte] By [arunkumar504a] at [2007-11-27 3:38:53]
# 1
That depends on their order on the classpath.The JAR that appears first on the classpath will execute its classes of the same name and path over similar classes in JAR's before it.
maple_shafta at 2007-7-12 8:42:13 > top of Java-index,Desktop,Deploying...
# 2

Packaging two versions of a library within a single application is not a good idea. Are you doing this because you have two libraries which overlap in some areas?

You should try and limit it to just one version, otherwise your application will be harder to maintain. How can you track down bugs if you don't know which versions of each library it's running with? You won't be able to determine whether the problem is in your code, or someone else's.

Bughunting is difficult enough without having multiple versions of libraries to consider :-)

RichFearna at 2007-7-12 8:42:13 > top of Java-index,Desktop,Deploying...