> Hmm, this patch wouldn't happen to fix the following odd error I'm currently
> chasing (below), would it?
> 
> Exception in thread "main" java.lang.NullPointerException
>         at tcl.lang.Interp.create(Native Method)
>         at tcl.lang.Interp.<init>(Interp.java:130)
>         at scriptmanager.ScriptManager.main(ScriptManager.java:24)

That looks like one of them. Jiang could speak to that better than I.

http://www.mail-archive.com/tcljava@scriptics.com/

> > I think you will find that in time, you
> > will toss out all your other JNI code and just use Tcl Blend
> > to do the "nasty JNI work". It is much easier to use Tcl or
> > IncrTcl to interface with C or C++ code.
> 
> Well, I doub't I'll toss the existing JNI code (read: I doub't I would get
> *paid* to!) but certainly sounds like a plan for any future JNI territory.
> Pulling one's own teeth would be more enjoyable than JNI ;) (well, maybe not
> quite that bad)

Thats funny, I was thinking that it would be more fun to poke myself in 
the eye with a pointy stick than write JNI code.

> But can the Java-based Tcl extensions "turn around" and call methods and
> access data of classes resident in the original Java VM instance (i.e. from
> where the Tcl interpreter was started via Tcl Blend/JNI)?

Yup, you can pass Java object handles around inside Tcl Objects. You
can wrap and unwrap them in Java code, and then call any Java methods 
you want. See the ReflectObject docs for info on how to do this.

http://dev.scriptics.com/man/java1.2/TclJavaLib/ReflectObject.htm

Mo DeJong
Red Hat Inc
 
> In other words: I want a Java application to create a Tcl interpreter and
> then have the Java extensions in that Tcl interpreter access objects/data in
> the "parent" Java application.
> 
> >From what I've read so far, I believe the answer is yes, but a sanity check
> is always good insurance.
> 
> john

----------------------------------------------------------------
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

Reply via email to