Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can a vector object be passed as a parameter from JNI to c++

 
Shan Accent
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai

i am working on a program were i need to pass the vector object which i am sending from java to c++

Through the jobject which i recieve in JNI , i cannot access the vector elements.

can u plz tell me how should i use it
 
Jayesh Lalwani
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread belongs to the the Othe Java API's forum.

To answer your question, you have to use reflection to call the methods on the Java Vector object from C++. Look at this chapter in the JNI tutorial on how to call Java functions from Native Code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic