Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I set current class loader

 
vasyl' mamay
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 257
Firefox Browser Hibernate Linux
 
vasyl' mamay
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no ClassLoader.getCallerClassLoader() method. In the
sample code,
o.getClass().getClassLoader()
will return the current loader for the class of object o.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic