Creating "semi"-shared gcj objects for other gcj applications?

Andrew Haley aph@redhat.com
Tue Jun 8 14:01:00 GMT 2004


Martin Egholm Nielsen writes:
 > Hi there,
 > 
 > This question is somewhat related to Sal's question back in May 
 > (http://gcc.gnu.org/ml/java/2004-05/msg00143.html).
 > 
 > However, I just want to make shared objects for use with other gcj 
 > applications.

It's all in the docs.

   * When you compile your classes into a shared library they can be
     automatically loaded by the `libgcj' system classloader.  When
     trying to load a class `gnu.pkg.SomeClass' the system classloader
     will first try to load the shared library
     `lib-gnu-pkg-SomeClass.so', if that fails to load the class then
     it will try to load `lib-gnu-pkg.so' and finally when the class is
     still not loaded it will try to load `lib-gnu.so'.  Note that all
     `.'s will be transformed into `-'s and that searching for inner
     classes starts with their outermost outer class.  If the class
     cannot be found this way the system classloader tries to use the
     `libgcj' bytecode interpreter to load the class from the standard
     classpath.  This process can be controlled to some degree via the
     `gnu.gcj.runtime.VMClassLoader.library_control' property; *Note
     libgcj Runtime Properties::.

Andrew.



More information about the Java mailing list