On Mon, 07 August 2000, Mo DeJong wrote:
> It looks like we might have another problem there. If we call JavaGetEnv()
> after Tcl Blend has been loaded into Java, the current thread
> (it is a Java created thread) would have already been attached
> to the JVM. Would calling env->AttachCurrentThread() do anything
> bad in this case?
This is a potential problem. I don't know whether it is safe to do a
"env->AttachCurrentThread()" on a Java thread. For maximum compatibility, let's
assume that it is not safe to do this.
> In the case where Tcl Blend is loaded from Java, do we want to
> set the JNIEnv pointer during the call to JavaSetupJava? That
> way future calls to JavaGetEnv will not try to attach to
> the JVM again?
>
> tsdPtr->initialized_currentEnv = 1;
> tsdPtr->currentEnv;
I think this is the right thing to do.
> This is all getting a little wacky, perhaps we need to split
> JavaGetEnv up into JavaGetEnv and JavaInitEnv, that might
> make things more clear.
Sounds reasonable.
-- Jiang Wu
[EMAIL PROTECTED]
----------------------------------------------
[EMAIL PROTECTED] is brought to you by
the Stanford Alumni Association and Critical Path.
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/[email protected]