Re: [tcljava-user] Jacl 1.4 - support for package require with "resource".
Brought to you by:
mdejong
From: Mo D. <mo...@mo...> - 2007-08-06 20:04:25
|
Patrick Finnegan wrote: > > Just wondering if "package require" works with resource and libraries > packed in jar files. > > e.g. something like. > > C:\Tcl\lib>jar -cvf tcllib1_9.jar tcllib1.9 > > set CLASSPATH=%CLASSPATH%;C:/Tcl/lib/tcllib1_9.jar > > java -classpath %CLASSPATH% tcl.lang.Shell > > % lappend auto_path resource:/tcllib1.9 > resource:/tcl/lang/library resource:/proclib resource:/tcllib1.9 > % package require term > can't find package term > % package require log > can't find package log > Would you be interested in writing up some patches and documentation for this kind of functionality in 1.4? Adding to the auto_path should work as long as a pkgIndex.tcl is found, see the logic in init.tcl to see how this works. It would also be very nice to be able to place a pkgIndex.tcl file in the root of a .jar file bundle and only have to add the .jar to the CLASSPATH or env(TCL_CLASSPATH). Mo DeJong |