Calling dll via JNI

Discussions

EJB programming & troubleshooting: Calling dll via JNI

  1. Calling dll via JNI (1 messages)

    Is it possible to call a dll via the JNI (on Win2K using JBOSS 3.0).

    I get an UnsatisfiedLinkError (but the dll resides in system32).
    It seems the JNI-Dll is loaded but a call through the JNI-dll produces the UnsatisfiedLinkError.

    When I run a standalone-application using the dll there is no problem.

    What I have to do????

    TIA

    Martin
  2. Calling dll via JNI[ Go to top ]

    Hi Martin,

    That UnsatisfiedLinkError comes only if your class unable to load the DLL you specified. It is probably that the path you specified may not be correct. So mention the complete path of your DLL.

    Suppose if your xyz.dll resides in system32, mention it as

    System.loadLibrary("c:\\winnt\\system32
    xyz");

    Good luck.

    Hari.