i have a dll driver to use in my Java application.
I read that i need to create a dll bridge for JNI. First of all I would like to know if exists some utility to creare automatically this bridge.
I have the source code of the Dll, and I also know how to creare my bridge header file (javah) but I can not understand how to put into bridge implementation because i just need to call the driver method….
Can you help me?
For example this is the header of my driver:
BOOL CALLINGCONV IsInitialized();
int CALLINGCONV Initialize(int Slot);
int CALLINGCONV Finalize();
int CALLINGCONV FinalizeML(int nSlot);
I also read about JNA, it seems easier but maybe it not very fast, is it true?
Thnak you
JavaCPP is as easy as JNA, but as fast as raw JNI. For example, this Java class could let access efficiently those four functions in Java, assuming the header and library files are named “Driver.h” and “Driver.lib” respectively: