Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

classloader


  • From: BTower@xxxxxxxxxxxxxx (Bryan Tower)
  • Subject: classloader
  • Date: Fri, 29 Oct 1999 16:29:59 -0400

Bill

If you use your classloader to load a class, then load other classes with
that original class, all subsequent classes will "go through" your
classloader.
This however, does not change the delegation model.  If the parent
classloader can find the java.util.Vector class, then your classloader will
not be used.
I believe that the bootstrap classloader will be able to load all of the
java classes, thus the Vector class will not be loaded with your
classloader.  This is true event if you said 
myClassloader.loadClass("java.util.Vector");
If you really need to do this, you can change the delegation model in your
classloader by making a call to findClass(className) before you call
super.loadClass(className).  This will make sure that all classes that can
be loaded through your classloader will be instead of being delegated.


Bryan Tower

-----Original Message-----
From: William Koscho [mailto:wkoscho@xxxxxxxxxxxx]
Sent: Friday, October 29, 1999 2:09 PM
To: advanced-java@xxxxxxxxxxxxxxxx
Subject: classloader


Hi,

When I create a ClassLoader and do a loadClass("classname");
It will use my classloader to load 'classname'.  However, is there
a way to get my class loader to load everything?  So that if you
say, new java.util.Vector().  It will load it using my class loader?

thanks

-bill


--

William J. Koscho
Software Engineer
Syncsort Inc.

email@work: wkoscho@xxxxxxxxxxxx
email@home: wkoscho@xxxxxxxxxxx

http://www.syncsort.com

--

"They call their favorite software Satan,
they call their computers demons,
and the website of their leaders is called satanic.org."

        -The Linux Riots




---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx