Classes or Jar, who wins?

Is it correct that in the case of duplicated classes, then in the "classes" will be accepted?

In a web application, consider class A, which will be available directly in

WEB-INF / classes

and part of the can in

WEB-INF / Library

Will the one who is always in the classroom win?

+5
source share
1 answer

It depends on the class path - the pathpath element that will be the first will win first. In addition, if there are several class loaders, the class loader that loaded the dependent class will be checked first. It should not depend on whether the classes are in the bank or not. Documented here .

, , .

+2

All Articles