UnsatisfiedLinkError when accessing a native method

I use eclipse and get the following error when I try to access my own method from a file ExtractImage.dll-

java.lang.UnsatisfiedLinkError: getVertices
    at com.coimp.application.ExtractImage.getVertices(Native Method)

I added dll to the underlying paths -

C:\Program Files\Java\jre1.5.0_10\bin;
. //current workspace
C:\WINDOWS\system32;
C:\WINDOWS;

and I used this method to load the library -

System.loadLibrary("ExtractImage");

Also tried -

System.load ("C: \ ExtractImage.dll");

Adding a DLL file to the NativeLibrary path

The same code works in my web application.

Geeks, any guesses to fix this problem? Thanks for the support.

0
source share
1 answer

In the "Run configuration ..." parameters on the "Arguments" tab, specify "VM arguments" "-Djava.librar.path = YOUR_DIR_TO_DLL"

DLL, PATH, (;)

, PATH ( "" ). ( ), " " ( ).

0

All Articles