File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Class loading hierrarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Class loading hierrarchy" Watch "Class loading hierrarchy" New topic

Class loading hierrarchy

Ragav Baskaran
Ranch Hand

Joined: Nov 04, 2007
Posts: 36
Hello All,

I want to know, how class loading works. For example if i have two classes named com.demo.DemoConstants in two jars named demo1.jar and demo2.jar and both jars in classpath , which class will be loaded by the JVM?

Is there any way to control the class that is getting loaded from the jar ?

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10824

Originally posted by Raga Vendran:

I want to know, how class loading works.

Did you try googling it? Did you get any results? Did you read those results. Which part of the results did you not understand?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Introduction to the class loader hierarchy and the boot classpath is a very good introductory article.
I agree. Here's the link:
subject: Class loading hierrarchy
It's not a secret anymore!