Re: [tcljava-user] "source resource:/" - howto?
Brought to you by:
mdejong
From: Mo D. <mo...@mo...> - 2007-07-16 19:16:54
|
Patrick Finnegan wrote: > > Can someone post an example or point to an example of how to use > "source resource:/". I want to put my JACL scripts in a jar file and > put the jar file on the class path. > The most simple example would go like so: % source resource:/tcl/lang/library/parray.tcl This uses the Java API to load a resource named "/tcl/lang/library/parray.tcl" This is loaded from jacl.jar via the system classloader: $ jar -tvf jacl.jar | grep parray 885 Thu Apr 19 13:34:28 PDT 2007 tcl/lang/library/parray.tcl To add your own scripts that use source, just jar up your .tcl files and place the jar on the CLASSPATH. Mo DeJong |