Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes how can a vector object be passed as a parameter from JNI to c++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how can a vector object be passed as a parameter from JNI to c++" Watch "how can a vector object be passed as a parameter from JNI to c++" New topic
Author

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

Shan Accent
Greenhorn

Joined: May 08, 2005
Posts: 23
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

Joined: Nov 05, 2004
Posts: 502
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.
 
 
subject: how can a vector object be passed as a parameter from JNI to c++