Reputation: 31
Below is my scenario
I have to develop a java code that needs to communicate with C Library ( DNP3 Library ) , i assume below are the steps
I have never worked on JNI , going through few examples i found they write the java code first and generate a .h file (JNI ) and then a corresponding C file.
Can you please reference me to any article that goes the other way round like C library (.c) -> JNI -> Java code ?
Thanks in advance Rakesh
Upvotes: 0
Views: 646
Reputation: 30830
Look at SWIG for a low level Java abstraction of your C library, then build a higher level Java library on top of that. This is a common approach when creating language bindings.
Upvotes: 1