aspose file tools
The moose likes Threads and Synchronization and the fly likes A question about ClassLoader Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "A question about ClassLoader" Watch "A question about ClassLoader" New topic
Author

A question about ClassLoader

kong song
Greenhorn

Joined: May 12, 2009
Posts: 13
Hi all:

The following code is extracted from org.apache.commons.chain.CatalogFactory source code.

Who can tell me under what conditions, Thread.currentThread().getContextClassLoader()==null,and fall down to execute

Why did it do this ?
Thanks for any comments !

Basell
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

From the Javadoc of Thread.getContextClassLoader():
Returns:
the context ClassLoader for this Thread, or null indicating the system class loader (or, failing that, the bootstrap class loader)


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: A question about ClassLoader
 
Similar Threads
Can you explain me this code ??
How to determine the current path of the classloader
Determining the active log4j.properties file
Loading POJO object without loading library first
externalize message from ejb to a xml or text file