views:

24

answers:

1

I need to support loading classes from other types of archives(tar.gz,tar.bz2...) and custom types defined by third parties. Do I need to override the 'loadClass' method to achieve that? (Perhaps theres another extension point for doing this? I still want to benefit from all the security checks made by the default class loaders).

+2  A: 

Unfortunately there's no standard class loader that delegates to a simple class name to byte[]/ByteBuffer interface. You'll need to either do your own class loader, save to an icky temporary file or, I believe, give URLClassLoader.newInstance a URL with a custom URLHandler.

Tom Hawtin - tackline
+1, I would go the URLHandler route
Guillaume