Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
[Q] Why no GetEnv() in jni.h? and What is JNI_GetCurrentEnv()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Why no GetEnv() in jni.h? and What is JNI_GetCurrentEnv()?



CW 6.2, MRJ SDK 2.2, Netscape PluginSDK 4.01a all for the Mac.

I am working on a Mac plug-in for NS and IE.
Apple's javah tool will only generate .h files; the -stubs option is not
available.

So rather than using my NT machine to generate them I was exploring
using the JNI interface rather than the JRI one.

However in the jni.h from Apple there is no entry in the JavaVM
interface function table at position 6 (per The Java Native Interface by
Sheng Liang under GetEnv).

On the other hand there is a declaration in jni.h for

JNIEnv * JNI_GetCurrentEnv();

This looked like a possible alternative to me. However I get a link
error for this. Yes I am including the JNILib from the MRJ 2.2 SDK.

So wassup? How do I get a JNIEnv *?

Does this mean I have to do things indirectly via, for example,
AttachCurrentThread?

IOW why is GetEnv not supported by Apple?
Or am I wrong?


respect....

Peter

--
"Developing quality software requires a great deal
of effort over a long period of time."

Doug Schmidt - C++ Report May 1996

"Developing quality software requires a great deal of effort
over a long period of time." Doug Schmidt - C++ Report May 1996




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.