This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Creating "semi"-shared gcj objects for other gcj applications?
- From: Andrew Haley <aph at redhat dot com>
- To: Martin Egholm Nielsen <martin at egholm-nielsen dot dk>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 8 Jun 2004 15:00:18 +0100
- Subject: Creating "semi"-shared gcj objects for other gcj applications?
- References: <ca4f51$b7e$1@sea.gmane.org>
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.