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]

Re: load native lib (SWT) with JNI on windows


>>>>> "Ingo" == Ingo Bormann <ingo.bormann@web.de> writes:

Ingo> Waht I always get is this:
Ingo> java.lang.UnsatisfiedLinkError: swt-win32-2049: file not found

Ingo> The dll is located in the same dir as the exe. I played a bit
Ingo> with pathnames and java.library.path property settings and tried
Ingo> to load the lib myself with System.loadLibrary() but did not
Ingo> succeed.

Offhand I don't know whether libltdl (which is what we use to
implement System.loadLibrary) knows to look in the executable's
directory on Windows.  I assume it does.

So then the question is: do you have libltdl included at all?  You
should if you have a native build.  Otherwise not (this is a bug,
maybe Ranjit will fix :-).  You can find out by running `nm' on libgcj
and looking for `ltdl'.

Note that java.library.path only works on the trunk (aka 3.3).

Ingo> From the previous posts I thought it was possible to use JNI and
Ingo> at least load the dll. Is there some trick to do this or is this
Ingo> a more general problem?

For Windows I don't know.

Tom


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