3

I'm looking to create an array of byte arrays in native code. I plan to use NewObjectArray() for the outer array, since Java arrays are objects. What should I specify as the class identifier for a Java byte array?

1
  • I have the same problem Commented Jan 16, 2018 at 11:31

1 Answer 1

2

NewByteArray allocates a jbyteArray (which corresponds to byte[]). Each of the primitive types has its own array handling functions in JNI.

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

1 Comment

This is not what he asked. He needs an array of byte arrays. Not just a single byte array. You should call NewObjectArray(), telling the array size and the class type - and the question is what class type should be specified for byte[], since the whole array is byte[][]

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.