aspose file tools
The moose likes Java in General and the fly likes classloader chain Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "classloader chain" Watch "classloader chain" New topic
Author

classloader chain

Thomas Rochon
Ranch Hand

Joined: Jul 11, 2002
Posts: 72
Hi there !
I'm fighting with a problem for a while and now I reached the
point from where I dont have any clue how to solve it.
I'm trying to create a custom classloader and put it into
chain with the default classloader, so if the default (systems)
classloader fails to find a class, this task schould be done
by my stunning custom classloader.
And here's how I try it:

What I expected this nice app will do is:
1. calling the default systems classloader to find my not existing class
2. the default systems classloader will fail to find the class and delegate
the request to my fabolous custom classloader by calling findClass
3. The console will show me 'custom loader trying to ...'
4. I will receive a ClassNotFoundException
Step 1 and 4 are doing great. But it seems like step 2 and 3
are missing. I debugged this app and it looks like the systems default
classloader isn't calling my custom classloader!
Does anyone have an idea why my code doesn't work?
I would be very thankful to receive some comments.
Thanx in advance!
- Thomas -
[ May 06, 2004: Message edited by: Thomas Rochon ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: classloader chain
 
Similar Threads
java class loader basic question..
Class Loading Question
Problem using custom ClassLoader
how to set different dir to resource bundle file
New Java, old CORBA