I’ve been trying to implement a custom classloader with applets but I’m having some performance problems.
If I create the classloader with the ClassLoader.getSystemClass() as parent, using defineClass (with bytecode) is fast. Problem then is that the instances I create from classes defined cannot find any class defined in the classloader used with the applet class.
When I use the classloader from the applet class as parent in my custom classloader, the performance of defineClass get very slow (like 3-4 defineClass pr second).
I’m currently using the first method and using reflections to get around the problem, but it’s a bit hacky, so any suggestions would be appreciated.