2

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).

Thiago Padilha
  • 4,590
  • 5
  • 44
  • 69

1 Answers1

2

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
  • 145,806
  • 30
  • 211
  • 305