I want my native function to take the java object as parameter and write it to jobject array in shared memory for the use of another process. How can I do this ? Thanks.
1 Answer
You cannot share a Java object across processes. The object lives in a VM and two processes have separate VMs. (Or your second process might not have a VM at all.)
You will have to extract all instances variables / properties from the Java object, put them in a struct (or a similar data structure) and share the struct.