This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: load native lib (SWT) with JNI on windows
- From: Tom Tromey <tromey at redhat dot com>
- To: Ingo Bormann <ingo dot bormann at web dot de>
- Cc: java at gcc dot gnu dot org
- Date: 18 Nov 2002 10:21:54 -0700
- Subject: Re: load native lib (SWT) with JNI on windows
- References: <200211181735.gAIHZSX26480@mailgate5.cinetic.de>
- Reply-to: tromey at redhat dot com
>>>>> "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