This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Loading native shared-libraries dynamically....
- From: Andrew Haley <aph at redhat dot com>
- To: Clemens Eisserer <Linuxhippy at web dot de>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 25 Nov 2002 14:32:52 +0000 (GMT)
- Subject: Loading native shared-libraries dynamically....
- References: <200211251420.gAPEKsX31905@mailgate5.cinetic.de>
Clemens Eisserer writes:
> Thanks for the fast response!
>
> > > Is it possible to load complied java (object-files) with gcj-compilied
> > > programs.
> > > The FAQ says, that its possible to load and interpret class-files
> > > dynamically but is this also possible with already compilied classes?
>
> Hmm, thx for this part.
> I have a class called bte, when I copy the bte.class into the
> program-dir, I dont have any problems using it.
> I´ve also a compiled shared-library, called "lib-bte.so or bte.so
> this-bte.so org bte.o" nothing does work. The compilier ignores
> it. If the bte3.class is in the dir, libgcj uses the class file
> instead of the native shared library.
>
> I´ve changed also the LD_LIBRARY_PATH to poit to this dir, but it
> hasnt affected ;-( Do I need to set any special Variables, so that
> libgcj can find my library?
>
> I´m really sorry wasting your time so often, its really embrassing
> for me, but I´ve played arround about 3 hours and I didnt find
> the solution.
Use "strace -F" to run your app, looking for calls to open(). You
will see attempts to open lib-bte.so, and you'll also see why theyj
fail.
Andrew.