Am I confused here?

I am currently loading Tcl Blend into Java in the sense that from a live
Java VM, I call 'import tcl.lang.*; Interp tclInterp = new Interp()' etc.
and I am able to interact with the C based Tcl interpreter, have dynamically
loadable extensions (written in Java) that run in the context of, and have
complete access to, all of my existing run-time Java code/data. The Tcl
scripts, using an extension created on the Java side:

        try {
                Class c = Class.forName( "CoreTclExtension" );
                Command o = (Command)c.newInstance();
                m_tclInterp.createCommand( "satlink", o );
        } catch( Exception e ) {
                System.out.println( "createCommand Failed: " + e );
        }

can query, manipulate etc the live Java code, in the context of the Java VM.

Of course, I must be careful on exactly how I handle threading, but it seems
to work fine so far. I'm using Tcl Blend 1.2.6 with the various patches, Tcl
8.3.1 and JDK 1.3 all on Windows 2000, built using Visual C++ 6.x using
"Makefile" wrapper projects.


I suspect the original poster's problems relate to the native library search
path on his Unix system. On windows, you need to have the Tcl<whatever>.dll
and TclBlend.dll files on the "PATH" as well as the corresponding .JAR files
on the Java CLASSPATH.

john


P.S. How can I get access to the 1.3 beta 'distribution' on a Windows
environment (i.e. I don't use CVS)



> -----Original Message-----
> From: Mo DeJong [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 29, 2000 3:41 PM
> To: Zhumei Wang
> Cc: [EMAIL PROTECTED]
> Subject: [Tcl Java] Re: [Tcl Java] problem with creating Interp object
>
>
> On Mon, 29 May 2000, Zhumei Wang wrote:
>
> > Hi,
> > I am new to TclBlend. When I tried to run the small example from
> > http://dev.scriptics.com/man/java1.1/TclJavaLib/Interp.htm#M25
> > I got the following message:
> >
> > SIGSEGV 11 segmentation violation
> >     si_signo [11]: SEGV
> >     si_errno [0]:
> >     si_code [1]: SEGV_MAPERR [addr: 0x4]
> >
> >         stackpointer=FFBEE1D0
>
> ...
>
> > [1] tcl.lang.Interp.create(Native Method)
> > [2] tcl.lang.Interp.<init>(Interp.java:130)
> > [3] jamesxxx.main(jamesxxx.java:8)
> > -------------------
>
> It looks like you are trying to load Tcl Blend into java.
> The existing 1.3 version of Tcl Blend is going to support
> this soon, but it does not work right now. You are of course
> welcome to join the discussion on how to fix this properly,
> see the mailing list archive for info.
>
> To get it working you need to start Tcl first and then load
> Tcl Blend (and the JVM) into a Tcl process. On UNIX systems,
> the "make install" rule creates two shell scripts that can
> be used to start a "Java enabled" version of tclsh or wish.
>
> Go to the bin directory where you installed Tcl Blend and
> note the jtclsh script. Then type these commands to run your
> example.
>
> cd $exec_prefix/bin
> ./jtclsh
> % package require java
> % java::call test main [java::null]
>
>
> I hope that helps
> Mo DeJong
> Red Hat Inc
>
> ----------------------------------------------------------------
> 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
>
>

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