Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1019011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:56:41+00:00 2026-05-16T10:56:41+00:00

In the parent delegation model for loading classes, I know that loadclass() is invoked

  • 0

In the parent delegation model for loading classes, I know that loadclass() is invoked on the parent, all the way to the top of the class-loader hierarchy (assuming the class is not loaded). At which point the topmost parent classloader’s findClass is invoked.
If this class is not found, how is the control transferred to the next classloader’s findClass method ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:56:41+00:00Added an answer on May 16, 2026 at 10:56 am

    The findClass(String) will be invoked by the loadClass(String) method of the classloader. It’s default
    implementation throws a ClassNotFoundException and is intended to be overridden by classloaders.

    The loadClass(String) method will call the following methods in that order

    • First it tries to find if the class already loaded: findLoadedClass(String)
    • Then if not found it calls the parent’ classloaders loadClass(String) method.
    • If not found, it will call the findClass(String) method (custom loading)

    So all a custom classloader has to do is override the findClass(String) method to load classes in a custom way. This will ensure the proper delegation in classloading. Check the links (javadoc), it explains what steps are taken and how the findClass(String) is called from loadClass(String)

    So the classloading takes place in following order (example)
    ClassLoader A with parent B (only explaining the findClass and loadClass)

                   A.loadClass()
                        |
                    (not-found?) (by findLoadedClass)
                        |
                   B.loadClass()
                        |
                    (not found?) (by findLoadedClass)
                        |
             systemclassloader.loadClass()  (Bs parent, also can be 
                        |                    called classpath classloader)
                        |
                    (not found?) (by findLoadedClass)
                        |
            bootstrap classloader.loadClass() (the bootstrap classloader, 
                        |                      this has no parent)
                        |
                    (not found?)
                        |
             systemclassloader.findClass()  (on system classloader, 
                        |                    will try to "find" class in "classpath")
                        |
                    (not found?)
                        |
                    B.findClass()
                        |
                    (not found?)
                        |
                    A.findClass()
                        |
                     (not found?)
                        |
                ClassNotFoundException
    

    At any given time if the class is found (eigther by findClass or findLoadedClass), that class is returned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a delegation parent that listen for click events in a set of
I'm using the project.task model where delegation creates a parent/child link between both. When
class Parent implements Serializable{ ........ } class Child extends Parent{ private void writeObject(ObjectOutputStream oos)
Class parent { protected void myMethod() { if(someCodition) { //return this as well as
I have a classic parent-collection of children relationship that is being used in a
So there is a parent page on one domain that includes an iframe from
Imagine a big company has a lot of delegation all around the world .
So here's the question: Suppose as min heap uses parent pointers such that each
With event delegation in jQuery 1.6, you can respond to events that have bubbled
First thing to note - I KNOW DELEGATION AND DECORATOR PATTERNS! Second - I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.