Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can a vector object be passed as a parameter from JNI to c++
 
Similar Threads
what is JNI and what are the advantages of JNI?
Invoke Java library from C/C++
create c++ object from java
how to pass Strng array from java to c Using JNI
Mapping C(void *) void pointer - JNI---- !!!URGENT!!!!