GCJ's URLClassloader and 'core' protocol

Andrew Haley aph@redhat.com
Sat Jun 26 12:21:00 GMT 2004


Sal writes:
 > Andrew Haley wrote:
 > > Sal writes:
 > >  > I've read the docs and looked into the code for URLClassloader and the 
 > >  > 'core' protocol, but am still unable to figure out how to get it to work 
 > >  > properly. Some help would be greatly appreciated.
 > > For loading classes you should used the "gcjlib" protocol.
 > 
 > I tried this protocol also... without any success.  Does it work for 
 > statically linked classes? From what I could gather from the source 
 > code, it only will load resources from .so/shared objects.

You want to load statically compiled classes that are already linked
into an executable, but into a different class loader context?

 > I'de like to keep all my classes linked into a self contained
 > executable if possible... though I think the ability to do both is
 > important.
 > 
 > > You should be able to load resources from shared libraries too.
 > 
 > Resources as in, images/.class files?

Class files are compiled when placed into a .so, other resources are
just copied.

Andrew.



More information about the Java mailing list