[tcljava-user] HELP...Calling TCL scripts from a Java program
Brought to you by:
mdejong
|
From: Tam H. <th...@su...> - 2001-05-12 20:23:19
|
ok, i'm trying the other approach by using the binary version of Jacl 1.2.6.
i'm trying to call the tcl script as describe below..am i missing any kind
of patch for jacl? both tcljava.jar and jacl.jar are on my classpath and
i'm using Forte for Java 1.0. i know the interp object is created bc it's
fine when i type newInterp.eval("puts {hello there}"), but doesn't invoke my
script when i use "source"..
ERRORS:
tcl.lang.TclVarException
tcl.lang.TclVarException
at tcl.lang.Var.lookupVar(Var.java)
at tcl.lang.Var.getVar(Var.java)
at tcl.lang.Parser.evalTokens(Parser.java)
at tcl.lang.Parser.eval2(Parser.java)
at tcl.lang.Interp.eval(Interp.java)
at tcl.lang.Interp.evalFile(Interp.java)
at tcl.lang.SourceCmd.cmdProc(SourceCmd.java)
at tcl.lang.AutoloadStub.cmdProc(Extension.java)
at tcl.lang.Parser.evalObjv(Parser.java)
at tcl.lang.Parser.eval2(Parser.java)
at tcl.lang.Interp.eval(Interp.java)
at tcl.lang.Interp.eval(Interp.java)
at com.nwoods.jgo.examples.demo1.Demo1.main(Demo1.java:1006)
JAVA PROGRAM:
import tcl.lang.*;
public static void main(String args[])
{
try
{
Interp newInterp = new Interp();
newInterp.eval("source d:/Tcl83/bin/hello.tcl");
newInterp.dispose();
}
catch (Throwable t)
{
System.err.println(t);
t.printStackTrace();
//Ensure the application exits with an error condition.
System.exit(1);
}
}
|