• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

To Authors : Class Loader - Why this "null"?

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Authors,

I had a look at the sample chapter. Very interesting. Waiting to get a copy of your work.

I have a question.

I understand that all the classes must have a ClassLoader. But when i try to get the class loader for "java.lang.Object", a null is the result. What does this signify?

Since ClassLoader is a class by iteslf, which class will load the "java.lang.Object", which is the parent, of all the classes.

Thanks for the clarification.

Cheers,
Ram.
[ August 11, 2005: Message edited by: Ramaswamy Srinivasan ]
 
Author and "Sun God"
Posts: 185
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramaswamy,

For historical reasons, all system classes have a null ClassLoader. It was done this way in the 1.0 release, and various programs depend on it, so compatibility concerns forced the JDK maintainers to keep it that way, even as ClassLoaders were redesigned.

Josh
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Josh,

Thanks for the answer.

Cheers,
Ram.
reply
    Bookmark Topic Watch Topic
  • New Topic