JNI complex java objects

Hi and thanks in advance,
I am using JNI interface to call a C++ library. On some of the library functions I have to pass complex structures. What is the best way to do it?
Thanks,
Guy
aquaswAsked:
Who is Participating?
 
CEHJCommented:
You can manipulate objects in native code by getting their fields. I suggest you take the Sun JNI tutorial

0
 
CEHJCommented:
Create a Java class with the correct fields. On the native side, unpack them and forward to C++
0
 
aquaswAuthor Commented:
Can you explain what do you mean by "unpack them and forward to C++". It's not a list of parameters it's a tree structure.
0
 
CEHJCommented:
Then you need to pass a class that encapsulates a tree
0
 
aquaswAuthor Commented:
How do I brows a java object that was pass to the c++. it's a jobject what can I do with it?
Can I get the members of the object?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.