Hello again,

Sorry, after I sent this message I saw that was a
"copy/paste" problem.  The "release" function is
at  wrong place...

Thanks anyway,

Denise.


On Fri, 30 Apr 1999, Denise Stringhini wrote:
> 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]


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

Reply via email to