This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 10768

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: 42959
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!