[tcljava-user] invalid command name "load" when eval tcl in java
Brought to you by:
mdejong
From: wang d. <ru...@ya...> - 2007-05-17 02:21:24
|
Hi, Now I am writing a java plugin in eclipse to try to get data from a Tcl API. My code is as following: Interp interp; interp = new Interp(); try{ interp.eval("package require XXXX"); interp.eval("::XXXX::YYYY"); // TclObject[] result = TclList.getElements(interp, interp.getResult()); } catch(TclException ex){ .................................. } finally{ interp.dispose(); } The error is "invalid command name "load"", there is "load [file join $dir zz.dll zz" in the tcl script of XXXX, the path of dll file is right. Why the dll cannot be loaded? And I also notice that [info sharedlibextension] is jar, not dll. The auto_path is "resource:lang/tcl/library", info library=E:\eclipse-SDK-3.3M6-win32\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070319.jar. I think maybe the enviornment is not set properply. But how can I change the environment? Could you please give me some idea? I really do not know. Any help will be greatly appreciated. Another question is when interp.eval(::xxxx::yyyy), there is error "cannot find package" or "invalid command name ::xxxx::yyyy. Does Jacl of Tclblend support package? Just want to confirm. I think this problem maybe is the same as the first one. BTW all the script run successfully in Tcl console. Thanks again Best regards, Joy ____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow |