File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Question on class loading Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Question on class loading" Watch "Question on class loading" New topic
Author

Question on class loading

abhishek pendkay
Ranch Hand

Joined: Jan 01, 2007
Posts: 184
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?


The significant problems we face cannot be solved by the same level of thinking which created them – Einstein
SCJP 1.5, SCWCD, SCBCD in the making
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32651
    
    4
Don't know. Try it. Remember "name" for a class includes its package.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

I think the official answer is "undefined". But as Campbell said, it only applies if the fully qualified name is exactly the same.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question on class loading
 
Similar Threads
Doubt about diagram class (realization)
WA #1.....word association
can non-static inner class access any member
andrew has wii
Doubt about diagram class