πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14576

Q: Returning null from JNI method?

#14576
From: Gabriel Lima
Date: Thu, 26 Aug 1999 00:00
19 lines
1151 bytes
Hi.
I must implement a native method that returns a Java string. So far so
good,
I can create the Java string from a const char * invoking
(*env)->NewStringUTF(env,  const char *).
My problem is another. Sometimes, instead of a String, the method must
return
a null value. But, as the method is implemented natively, I donοΏ½t know
how to access the 'Java null' value/datatype/object/whatever.

I searched in jni.h for 'null' and found nothing, and the Java Tutorial
does not
mention this.

If someone knows how to return a 'Java null' from a Native JNI method,
please
let me know. Thanks in advance

        Gabriel
Technical Details
Message-ID: <37C58C9D.62A27FEC@enea.se>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,a44fb18b0c4ec7a2,start
X-Google-Attributes: gidf74b3,public
From: Gabriel Lima <Gabriel.Lima@enea.se>
Subject: Q: Returning null from JNI method?
Date: 1999/08/26
Message-ID: <37C58C9D.62A27FEC@enea.se>
X-Deja-AN: 517382049
Content-Transfer-Encoding: 8bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language