Unsatisfied Link Error even if DLL is reachable (java)

Viewed 328

In our java program we have to use a dll, but we get the error:

Exception in thread "OPCAgent:OPCVARCHECK5" java.lang.UnsatisfiedLinkError: javafish.clients.opc.JCustomOPC.coInitializeNative()V

As you see, the dll is in the correct place because we do not get the no .. in libray path error.

The java we use is 32 bits and the dll is also 32 bits.

We can not call any of the native methods.

private static native void coInitializeNative() throws CoInitializeException;

We are sure the dll is correct place and reachable from the program because if we change the location of the dll the error message becomes from

Exception in thread "OPCAgent:OPCVARCHECK5" java.lang.UnsatisfiedLinkError: javafish.clients.opc.JCustomOPC.coInitializeNative()

to

Exception in thread "main" java.lang.UnsatisfiedLinkError: no ./lib/JCustomOpc in java.library.path

How can I debug the issue? I tried some dll disassembly programs but many of them contains virus, malware etc. Any idea to see the signatures of the dll? The .net reflector fails.

1 Answers

Be sure that your JCustomOPC.dll and jeasyopc.jar files are compatible. Possibly you use different versions of these library files.

Related