This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How the "library naming scheme" works loading dynamical libraries?


Hi,

I just stumbled across:

http://gcc.gnu.org/ml/java/2002-11/msg00394.html

searching for how to implement and use gcj-natively-compiled shared libraries loaded dynamically (R).

In short, this posting's example loads an implementation (named "bte") of an interface (named "bi") dynamically at runtime using "Class.forName("bte")" and having LD_LIBRARY_PATH pointing to the path of the shared library.

Fine! However, I'm not quite familiar with the mechanism that tracks down the implementation, "bte", located in the library "lib-bte.so".

Does the class loader search each and every library in LD_LIBRARY_PATH for this implementation? In it does, when does it do - at gcj init-time or at Class.forName() invocation-time?

In case the library to "search" is determined by the argument to Class.forName(), how does one create and use a shared library with more than just one "implementation"?

BR,
 Martin Egholm


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]