Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes when a  user-defined class loader is required?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "when a  user-defined class loader is required??" Watch "when a  user-defined class loader is required??" New topic
Author

when a user-defined class loader is required??

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 576
In java based application .JVM will load all possible class when it required, then please explain in which scenario a user-defined class loader should be used in an application??
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you want to modify the byte code at load time. If you want to compile a JVM script language script from the source on load. All sorts of other reasons.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37970
    
  22
Class-loaders are hardly a beginner's topic. Moving.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Depends on what you mean by "user-defined".

If you count a URLClassLoader as a "user-defined" classloader, then you might do that to implement a plug-in architecture.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41101
    
  45
Plugins: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when a user-defined class loader is required??
 
Similar Threads
Advantages of User Defined ClassLoader?
Call from native thread is not handled by context class loader
SRV1.9.7-Please clarify
Application of user defined class loader?
classloaders in a jvm