aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
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: 39409
    
  28
Class-loaders are hardly a beginner's topic. Moving.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18658
    
    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: 42282
    
  64
Plugins: http://www.javaranch.com/journal/200607/Journal200607.jsp#a1


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: when a user-defined class loader is required??