1

I have a structure defined in my native c library and i want to pass it to the java. In java then i want to access this structure elements. How to do this. Can anybody explain me with one example showing both c and java code. I will definitely appreciate for the help. Please help me as soon as possible.

user1497818
  • 375
  • 1
  • 7
  • 16

1 Answers1

1

Create a Java object in your C code and populate it with the data from the C struct. See the accepted answer for How to pass C structs back and forth to Java code in JNI? for more details.

Community
  • 1
  • 1
Michael
  • 57,169
  • 9
  • 80
  • 125