Hello,

I'm trying to port my Java 1.2 Solaris native 
method to Java-Linux 1.2 pre1.

The program is running, but the string parameter
that I pass to native method isn't correctly 
converted.

Here is a piece of code:

JNIEXPORT void JNICALL 
Java_CmdDist_startcons (JNIEnv *env, jobject obj, jstring message){

         //message conversion
        const char *str = (*env)->GetStringUTFChars(env, message, 0);  
        (*env)->ReleaseStringUTFChars(env, message, str);  
        
        printf("str = %s\n", str);
 
And what is printed ("pt" was printed by 
caller before the call):

pt = a 
str = (”@(”@ 

With Solaris as with an older Linux-Java version
(1.1.6 I think)  this code worked well.

Thanks for any help,

Denise


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to