Re: [tcljava-user] "source resource:/" - howto?
Brought to you by:
mdejong
From: Mo D. <mo...@mo...> - 2007-07-17 19:13:17
|
Patrick Finnegan wrote: > > > Every top level script gets the $TCL_LIBRARY variable and calls > sourceProcs.tcl which does a recursive search under the TCL_LIBRARY > directory, locates any directory called proclib and sources each > procedure script in the proclib directory loading everything up into > the namespace. > > What I would really like to do is dynamically load the procedure > scripts as required in a "package require" type scenario. But > "package require" is not supported under jacl Package require is supported under Jacl. It is likely you are not using the auto_path variable in the way it should, you can add a path with a "resource:/" prefix to the auto_path and it should be searched as expected. > so I thought about using auto_mkindex which seems to be supported > under jacl. It seems to work with both directories and jar files. > Great! > > 1. Directory. > ******* > wsadmin>auto_mkindex proclib > > then ................... > > set TCL_LIBRARY="directoryPath/proclib" > > Call jacl with the java -D option > > java bla bla bla "-DTCL_LIBRARY=%TCL_LIBRARY%" > This is not how TCL_LIBRARY should be used. In general, TCL_LIBRARY is where Tcl/Jacl find its own scripts. You should not use this for your application scripts. cheers Mo DeJong |