Link to home
Start Free TrialLog in
Avatar of aquasw
aquasw

asked on

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
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Create a Java class with the correct fields. On the native side, unpack them and forward to C++
Avatar of aquasw
aquasw

ASKER

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.
Then you need to pass a class that encapsulates a tree
Avatar of aquasw

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial