Posted By:
James_Smith
Posted On:
Thursday, December 19, 2002 10:31 AM
Hi there I want to return the value of a C int carr[4] to the java object int jarr = new int[4] I don't want to just return the carr but would like to do something similar to what would be done if I wanted to return a singe int as described below. FieldId fldId = (*env)->GetFieldID(env,cls,"jint1","I"); (*env)->SetIntField(env,obj,fldId,(jint)cint1); I think I'm to use FieldId arrFldId = (*env)->GetFieldID (env,cls, "intarr", "[I"); but what must I use to set the arr? Am I on the right track? thanks in advance Cheers James
More>>
Hi there
I want to return the value of a C
int carr[4]
to the java object
int jarr = new int[4]
I don't want to just return the
carr
but would like to do something similar to what would be done if I wanted to return a singe int as described below.
FieldId fldId = (*env)->GetFieldID(env,cls,"jint1","I");
(*env)->SetIntField(env,obj,fldId,(jint)cint1);
I think I'm to use
FieldId arrFldId = (*env)->GetFieldID (env,cls, "intarr", "[I");
but what must I use to set the arr? Am I on the right track?
thanks in advance
Cheers
James
<<Less