JNIHelp.h

574 views
Skip to first unread message

Pascal Merle

unread,
Jul 1, 2009, 6:18:42 PM7/1/09
to android-ndk
Why is JNIHelp.h not provided? jni.h and libnativehelper are, so why
have these functions been left out? They look very useful to JNI
developers.

David Turner

unread,
Jul 2, 2009, 5:45:19 AM7/2/09
to andro...@googlegroups.com
JNIHelp.h is not stable. Moreover it depends on <utils/Log.h> which is also totally private to the system.
libnativehelper.so is not exposed by the NDK either, any code that depends on it might break in the future.

Pascal Merle

unread,
Jul 2, 2009, 5:24:15 PM7/2/09
to android-ndk
One could remove the dependency on <utils/Log.h> by just commenting
that line out because it is not needed within the header itself, don't
one?

If you want to keep the rest of JNIHelp.h private I can understand
that but what I don't understand is why you say it would be unstable.
Many JNI sources within Android use it. Do you think of any
instability when used from the NDK? Or is it some parts that are not
used and not stable, and you want to avoid anybody starting to use
them?

David Turner

unread,
Jul 3, 2009, 3:06:53 AM7/3/09
to andro...@googlegroups.com
On Thu, Jul 2, 2009 at 11:24 PM, Pascal Merle <pmer...@googlemail.com> wrote:

One could remove the dependency on <utils/Log.h> by just commenting
that line out because it is not needed within the header itself, don't
one?

If you want to keep the rest of JNIHelp.h private I can understand
that but what I don't understand is why you say it would be unstable.
Many JNI sources within Android use it. Do you think of any
instability when used from the NDK?


Yes, the fact taht many sources within the system use it doesn't mean that nothing
will change in the future. You should consider the content of JNIHelp.h as internal
helper functions for the system, not for applications.
 
Or is it some parts that are not
used and not stable, and you want to avoid anybody starting to use
them?

The main problem is that these APIs require that your shared library links to the
dalvik library, which ABI is certainly not stable, and I'm pretty sure that the VM
authors don't want to support that at the moment.




Pascal Merle

unread,
Jul 3, 2009, 12:39:45 PM7/3/09
to android-ndk
> which ABI is certainly not stable

I don't understand that part. What does the ABI stand for? Thanks.

David Turner

unread,
Jul 3, 2009, 1:23:23 PM7/3/09
to andro...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages