Re: [tcljava-user] Executing tcl script from java using Interp, need help about classpath
Brought to you by:
mdejong
|
From: Mo D. <md...@cy...> - 2001-03-29 06:17:12
|
On Wed, 28 Mar 2001, Ying Jin wrote:
> Hello,
> I tried to run code:
> Interp interp;
> interp = new Interp();
> interp.eval("puts {Hello, world}");
> interp.dispose();
> --------------------------------------------
> I got error:
> Exception in thread "main" java.lang.NullPointerException
> at tcl.lang.Interp.create(Native Method)
> at tcl.lang.Interp.<init>(Interp.java:130)
> at RuleMgr.main(RuleMgr.java:11)
> tcl.lang.TclRuntimeError: could not find class java/lang/Object.
> Check that your path includes the directory where tclblend.dll resides.
> Try looking in the directories under the value of tcl_library..
> -----------------------------------------------------------
> But I already set path and classpath to the lib of tcl and tclblend:
> set
> path=%path%;f:\jdk1.2.2\bin;C:\Progra~1\Tcl\lib;c:\Progrm~1\Tcl\lib\tclblend;c:\unzipped\tclblend126\tclblend1.2.6\win
>
> set classpath =
> %classpath%;f:\jdk1.2.2\lib;c:\unzipped\tcl823\tcl8.2.3\win;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tclblend\;c:\unzipped\tclBlend126\tclBlend1.2.6\win\tcljava\;.;c:\Progra~1\tcl\lib\tclblend;C:\Progra~1\Tcl\lib
>
> ---------------------------------------------------
> What should be added to the path and classpath?
> Thanks a lot.
You need to add tclblend.jar and tcljava.jar to the CLASSPATH.
You can't just include the directory:
set CLASSPATH=D:\tcljava.jar;D:\tclblend.jar
Mo DeJong
Red Hat Inc
|