I have two questions Say I have some structure in jni say
struct X
{
Type_A x;
Type_B y;
}
Now how do I?
If possible, please give an example.
Java Native Access handles the details automatically (in addition to avoiding the native compilation step entirely).
public class MyStructure extends com.sun.jna.Structure {
public int x;
public int y;
}
It also supports nested types, so you can have structures, pointers, or even unions as fields within the structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With