Paul Reavis wrote:
> 
> 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).

*smile*, that exactly what i want.
I want to speed up the start of plugin-applications with an own
class-loader.
I start with a very small preloader, that can display some more custom 
"loading..."-Messages while the main part of the application is loaded
from a huge jar-file.
But i don't want to load ALL classes at startup. 
Some classes should be loaded on demand from a server.
I think i must do this with a direct file-access ;)


Bernd

-- 
--------------------------------------------------------
 Bernd Wengenroth
 IoS Gesellschaft für innovative Softwareentwicklung mbH

 Donatusstraße 127-129     WWW: http://www.IoS-online.de
 50259 Pulheim             email: [EMAIL PROTECTED]
 Tel: 02234 / 986434       Fax: 02234 / 986433

Reply via email to