wood burning stoves*
The moose likes Java in General and the fly likes How can I set current class loader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How can I set current class loader" Watch "How can I set current class loader" New topic
Author

How can I set current class loader

vasyl' mamay
Greenhorn

Joined: Sep 29, 2006
Posts: 2
Hi,

How can I set current class loader?

I have such output
system class loader: com.inobject.chowsf.test.MockClassLoader
context class loader: com.inobject.chowsf.test.MockClassLoader
current class loader: sun.misc.Launcher$AppClassLoader@94af67

for code:
Srinivas Kalvala
Ranch Hand

Joined: Oct 20, 2005
Posts: 257

Refer this,
http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html
vasyl' mamay
Greenhorn

Joined: Sep 29, 2006
Posts: 2
There is nothing about setting current class loader.

I this article created ClassLoader used in next way:


But I need to know how to set ClassLoader, that return ClassLoader.getCallerClassLoader() method. It is used for implicit class loading when I try create object.
Allan Jacobs
Greenhorn

Joined: Aug 28, 2006
Posts: 15
There is no ClassLoader.getCallerClassLoader() method. In the
sample code,
o.getClass().getClassLoader()
will return the current loader for the class of object o.
 
jQuery in Action, 2nd edition
 
subject: How can I set current class loader
 
Similar Threads
how to get the current Object reference name?
classloader program
Setting new default class loader
Set all ComponentOrientation to rtl
Fail to Use Custom ClassLoader