0

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
  • lets say I somehow have an access to array in shared memory. So I wonder how to take java object and write it to array ? Commented Sep 8, 2013 at 19:55

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.