Juergen Kreileder wrote:
>
> >>>>> Bernd Wengenroth writes:
>
> > Hello, I want to load class-files with the
> > ClassLoader.getResourceAsStream( String )-methode.
>
> > i.e. xxx.getResourceAsStream( "package/myClass.class" );
>
> > It's works fine on files without a ".class"-postfix. But files with
> > this prefix are not opened (the methode reports null). If i copy
> > the same file to the same directory, but without the postfix, the
> > stream is returned as expected.
>
> > Any hints ?
>
> That's a security feature, you can't get classes with getResource.
And you should be able to get around it with a custom classloader (which
isn't as hard to implement as you might think).
--
Paul Reavis [EMAIL PROTECTED]
Design Lead
Partner Software, Inc. http://www.partnersoft.com