25.7.10

NetBeans ClassLoader System

netbeans-classloader-system

The NetBeans classloader system is an essential part of the NetBeans runtime container and a continuation of the encapsulation of modules and structuring of a modulear architecture.is system consists of three different types of classloaders. These are the module classloader, the system loader, and the original classloader. Most classes are loaded by the module classloader. Only in certain cases, such as when resources must be accessed outside a module, is the system class

  • Module Classloader
    • For every module registered in the Module System, an instance of the module classloader is made available by means of which every module obtains its own namespace.
  • System Classloader
    • ClassLoader cl = Lookup.getDefault().lookup(ClassLoader.class);
    • ClassLoader cl = Thread.currentThread().getContextClassLoader();
  • Original Classloader
    • Is used by the launcher of the application.

No comments: