Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JNI char * in c -- to -- jcharArray to -- char[] in Java


  • From: sureshsankar@xxxxxxxxxxxx (Suresh Sankar)
  • Subject: JNI char * in c -- to -- jcharArray to -- char[] in Java
  • Date: Tue, 29 Feb 2000 13:08:32 +0530

We have a C function which generate a [ char *] .
We want to receive this [char *] in java method as { char[] }

suppose the java native method looks like

public native char[] SessionKeyGenerate(String passphrase);

the [ .h ] file 

gives me the function declaration as

JNIEXPORT jcharArray JNICALL Java_.._.._.._.._SessionkeyGenerate(JNIEnv
*,jobject, jchararray);

how do i  convert a char * to a jcharArray so that it can be returned to
the Java function.

Please give pointers to some good jni tutorials.

Thanks
Suresh Sankar
Technology Communication Systems (I) Pvt Ltd.
New Delhi
INDIA

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx