Article View: borland.public.jbuilder.java.language
Article #19487Re: JNI error
From: Carl Quinn
Date: Wed, 28 Jan 1998 00:00
Date: Wed, 28 Jan 1998 00:00
38 lines
1638 bytes
1638 bytes
This usually means that (1) your DLL was not found/loaded, or that (2) your
native function was missing or had a bad signature (more likely).
For the first, make sure that your DLL is somewhere on the path that
jbuilder's java will find easily. I would add your linker-target directory to
your main path setting to make things easy.
For the second, make sure that your function has the right name as described
in the JNI spec. I've been using the JavaSoft JNI tutorial & spec for
information on this. The form looks like:
JNIEXPORT void JNICALL
Java_mypackage_myclass_myMethod(JNIEnv* env, jobject obj, jobject hConnection,
jobject hStream, jobject phContainer)
{
}
Where mypackage and myclass are the package package and class names using "_"s
and myMethod is the method.
--carl
Ming Maa wrote:
>
> Hello,
>
> Can someone please help me with the following error when I use JNI?
>
> Exception occurred during event dispatching:
> java.lang.UnsatisfiedLinkError: writeboard
>
> where writeboard is my native method.
>
> Any help is greatly appreciated. Thanks!
> Ming Maa
> mmaa@mit.edu
Technical Details
Message-ID:
<34D02AA9.7619F994@quinn.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34CF4F2B.6126572C@mit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a14076001654d18d X-Google-Attributes: gidf74b3,public From: Carl Quinn <cquinn@quinn.org> Subject: Re: JNI error Date: 1998/01/28 Message-ID: <34D02AA9.7619F994@quinn.org> X-Deja-AN: 320201057 Content-Transfer-Encoding: 7bit References: <34CF4F2B.6126572C@mit.edu> Mime-Version: 1.0 Reply-To: cquinn@quinn.org Content-Type: text/plain; charset=us-ascii Organization: None Newsgroups: borland.public.jbuilder.java.language