Re: [tcljava-user] package require in Jacl
Brought to you by:
mdejong
From: Mo D. <md...@un...> - 2003-01-23 21:00:59
|
On Thu, 23 Jan 2003 16:08:56 +0000 Pak Leung <pak...@di...> wrote: > Hi, > > I would like my Java program to run a tcl script which requires a > package called Service. > > How can I tell the jacl Interpter to find the "Service" package? The "package require XXX" command works just like it does in Tcl, in that it looks at the directories in the "auto_path" global variable and tries to load any packages found in those directories. Each dir on the auto_path is checked to see if it has a pkgIndex.tcl file or a subdir that contains a pkgIndex.tcl file. This pkgIndex.tcl file is then source'd, which runs the package provide command in the file. You can set the auto_path however you like, you might also want to try out the -DTCLLIBPATH=/somedir argument to the java executable. That will add the /somedir argument to the auto_path from the command line. cheers Mo |