The Java jni specifications require a JNIEnv* for almost all functions they
provide.  Furthermore it seems that if multiple Java threads can access the same
function, each function call must use the JNIEnv* from the current thread.

Given that function I am writing is maybe 20 deep in a call hierarchy of C++
functions I have written, is there any way of accessing the correct JNIEnv*
short of passing it all the way down as C++ function arguments?

Putting it in a global or within a global class does not work in my case because
multiple Java threads can be using the same C++ function.

I need a solution that works under Linux, though something that is portable to
Microsoft* would be ideal.

    Norman Shapiro
    5011 Mattos Ct
    Fremont CA 94536-7170
    (510) 795-1800
    [EMAIL PROTECTED]


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

Reply via email to