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 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.