Replace ClassLoader of a custom module

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Replace ClassLoader of a custom module

I want to create a custom module that will have the ability to load certain classes from network/DB.

For example, any class that is under the package 'a.b.c' should be loaded from the network, but all other classes should be loaded via the standard class loader of the module.

My initial thought was to create a custom ClassLoader (e.g. a variant of NetworkClassLoader) that would be able to achieve this, but I could not find a way to replace the ClassLoader of a netbeans module to use my custom ClassLoader instead of the 'StandardModule.OneModuleClassLoader'.

Any ideas on how I can achive this?