Here's what I get from running java -version:
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-beta)
Java HotSpot(TM) Client VM (build 1.3-beta, mixed mode)
This is Sun's latest release, near final, so if that's the problem I
suggest letting Sun know. I'm sure lots of people will be upgrading to
this version (has various advantages). One note - somewhere I read
they reimplemented various things using JNI in this release, for
performance reasons, so maybe that's causing problems.
In case it wasn't clear from my previous note, when I instantiate
Interp from the main Java thread, it works.
I'm currently reworking my code to make the tcl thread be the first
thing I start, and have it start everything else. Makes the software
structure kind of funky but if it works ...
thanks
- Mike
At 11:40 AM 07/26/2000, Jiang Wu wrote:
> It should work. What is the JVM environment you are using? Is it 1.2,
> native thread?
>
> -- Jiang Wu
> [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Mike Schwartz [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 25, 2000 9:52 PM
> > To: Jiang Wu; Mo DeJong
> > Cc: [EMAIL PROTECTED]
> > Subject: tcl Blend and Java threads...
> >
> >
> > Hi,
> >
> > I read Jiang's paper -- very helpful, thanks.
> >
> > So, I tried to follow the example in the section "Allocate a Tcl
> > Interpreter Thread"
> > (http://www-cs-students.stanford.edu/~jwu/Using_Tcl_in_Java.ht
> > ml#9), but
> > what I wrote doesn't work. Here's the code:
> >
> > import tcl.lang.*;
> > public class Try {
> > public static void doit() {
> > System.out.println("pt0");
> > (new TclThread()).start();
> > System.out.println("pt1");
> > }
> > private static class TclThread extends Thread {
> > Interp myInterp;
> > public void run() {
> > System.out.println("pt2");
> > myInterp = new Interp();
> > System.out.println("pt3");
> > }
> > }
> > }
> >
> > It hangs after printing "pt2" (specifically, it prints pt0,
> > then pt2, then
> > pt1, and never gets to pt3). So, I don't seem to be able to
> > create the
> > single dedicated Tcl interpreter thread in anything but the main
> > thread. What did I do wrong?
> >
> > Thanks
> > - Mike
> >
----------------------------------------------------------------
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/tcljava@scriptics.com