Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on class loading  RSS feed

 
abhishek pendkay
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if there are 2 jar files in WEB-INF/lib directory of (a.jar and b.jar), they both have the same class but different implementation, which one gets loaded into JVM/ is it alphabetical? what's the order of precedence?
 
Campbell Ritchie
Marshal
Posts: 55681
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Try it. Remember "name" for a class includes its package.
 
Rob Spoor
Sheriff
Posts: 21088
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the official answer is "undefined". But as Campbell said, it only applies if the fully qualified name is exactly the same.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!