error when system.load()

Dorothy Wu kaffe@rufus.w3.org
Fri, 30 Nov 2001 17:01:12 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_001D_01C179C0.9D4F82C0
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

hi,
I met a problem when I use JNI.

I wrote two shared libraries (c/c++).
Then I used them in my c/c++ application.
Everything is Ok, my c/c++ application can use these libraries.

But when I use it in kaffe by JNI,
Only one library can load, another can never loaded by System.load().
Error is:
"UnsatisfiedLinkError: file not found."

I have checked the path, everything is OK.
The difference between these two libraries is,  the latter do not link =
any library.
The link command is:
"ld -shared --whole-archive x.o y.o -o libxy.so"
I do not think it is the reason why I can not load it.

But why, it is a bug of System.load()?

Thanks!

Stock Wu



------=_NextPart_000_001D_01C179C0.9D4F82C0
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I met a problem when I use =
JNI.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I wrote&nbsp;two&nbsp;shared=20
libraries&nbsp;(c/c++).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Then I used&nbsp;them in my c/c++=20
application.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Everything is Ok, my c/c++ application =
can use=20
these libraries.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But when I use it in kaffe by =
JNI,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Only one library can load, another can =
never loaded=20
by System.load().</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Error is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>"UnsatisfiedLinkError: file not=20
found."</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have checked the path, everything is=20
OK.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The difference between these two =
libraries is,  the=20
latter do not link any library.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The link command is:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>"ld -shared --whole-archive x.o y.o -o=20
libxy.so"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I do not think it is the reason why I =
can not load=20
it.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But why, it is a bug of =
System.load()?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Stock Wu</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_001D_01C179C0.9D4F82C0--