Hi Jini users,
Excuse me for asking this question !!.It is a part of my Jini Service
which uses Java Native interafce with C.I am new to Java, I have written
a small java code which calls a C function by passing a string
array(2D). Following is the native function C code which prints garbage
when I execute 'java' of my java class. It is perfectly printing the
length of the array but not the contents of the arrya.How to access the
contents of string array and also how
to return a 2D array from C to java and read in java?.
-------------------------------------------------------------------------
...
JNIEXPORT void JNICALL Java_MyFunction
(JNI Env *env, jobject my_object,jobjectArray my_array)
{
jobject value1 = (*env)->GetObjectArrayElement(env, my_array, 1);
printf("%s\n",value1);
}
-------------------------------------------------------------------------
Thanks in advance,
Nagaraj
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]