Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using JNI interface, how to go both ways to between JObject and C++ list structure

meimei li
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to invoke C++ function in Java. I have created the JNI interface and the signature of the native method is as follows:
(JNIEnv *, jclass, jint, jobject, jstring, jobject, jobject);
I need convert the passed parameter jobject (which is a java.lang.List) object to a c++ List type so that it can be passed to the C++ method YYY which actually does the work.
I also need convert the return value of YYY from C++ List to JAVA jobject of java.lang.List type.
I know how to convert String, array from what I learned from Java tutorial, but have no clue about more complex types.
I really appreciate your help.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic