The API you need to call native code in a DLL is JNI (Java Native Interface).
JNI requires that the functions in the DLL adhere to a specific calling convention (i.e., the names and parameters of the functions have some restrictions).
If you have a third party DLL that does not conform to those restrictions, then you write a bridge DLL yourself, with functions that can be called through JNI, and the functions in the bridge DLL call the functions in the third party DLL.
Originally posted by Jignesh Lakhani: I have DLL file which can't be edit. I have Java Access Bridge but how to use it for 3rd party dll file. So what should I do. Can you give any sample.
Did you understand my first response? You don't need to edit a DLL file. Do this:
Write your own bridge DLL in C or C++. That DLL should contain functions in such a format that they can be called through JNI, the Java Native Interface. The only thing the functions in your own DLL have to do is call the functions in the existing 3rd party DLL that you have (converting parameters and return values as appropriate).
From your Java program, call the functions in your own bridge DLL via JNI.
Do you mean Java Access Bridge? That's not an API meant to call any arbitrary 3rd party DLL with.