-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot instanciate an array of native type #112
Comments
You mean a primitive array (int[])? Use var intArray = [1, 2, 3];
... Update: var intArray = [1,2,3];
intArray = klass.staticFillMethod(intArray);
send('data', intArray); |
No, in my case I cannot use a method that return an array, my method only fills the buffer passed as parameter. As you suggested first, I tried to simply instantiate a JS array ( |
One possibilty would be to create a wrapper class in Java so you could load it with
But I think the preferred way would be something like that (but it isn't currently implemented) const intArray = Java.primitiveArray("int[]", [1,2,3]);
klass.fillMethod(intArray); |
Ok, thanks a lot for your answer. I'll update my post later when I use it. |
@stevielavern any update please? |
Hi,
How can I instanciate an array of native Java type, say "int" ?
The goal would be to be able to pass it to a method that will write to this array, something similar to this :
Thank you,
The text was updated successfully, but these errors were encountered: