This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I set current class loader