开发者

tomcat and his classpath manager

开发者 https://www.devze.com 2023-01-17 09:56 出处:网络
if deploy on tomcat myapp开发者_如何学编程.war contains two lib (lib1.jar and lib2.jar), which contain both a.b.c.MyObj

if deploy on tomcat myapp开发者_如何学编程.war contains two lib (lib1.jar and lib2.jar), which contain both a.b.c.MyObj

which one chooses at the time of the creation of MyObj ?


The behavior is not predictable. The class loader loads the first properly named class it finds in the classpath and effectively "hides" all other properly named classes.

Look at this tip from javaworld which references a tool named JWhich to help in these scenarios.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号