Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

In Classpath

Thread view: 
ramakrishna - 08 May 2006 07:23 GMT
Hi Folks,
       I have doubt in the classpath.
       i have the same class files (even with package structure) in 3
jar files and i have added  all the three jar files in my classpath.

       Can you please send me reply my question.

       Q1) When i import the class files in my program which loaded
into my program.
Bart Cremers - 08 May 2006 07:36 GMT
This depends a bit on the way the classloader is implemented. If you've
got the same class in different jar files, the classloader normally
will load the first class with the exact fully qualified name it finds.
The standard classloader will normally go through the classpath in
order it is defined. So the first jar containing the class in the
classpath will provide the class. The other jars will simply be
ignored.
Again, this depends on the implementation of the classloader. Remember
that classloaders are not required to take the classpath into account
when loading classes.

Bart
ramakrishna - 08 May 2006 09:11 GMT
Thank u Bart Cremers


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.