Re: [tcljava-user] TclBlend - how to debug?
Brought to you by:
mdejong
From: Patrick F. <fin...@gm...> - 2007-06-27 15:23:31
|
On 27/06/07, Tom Poindexter <tpo...@ny...> wrote: > > On Wed, Jun 27, 2007 at 03:59:45PM +0100, Patrick Finnegan wrote: > > I get a Null point exception when I try to instanciate an imported > class. > > What's the best way to debug Blend? > > > > Using TclBlend Windows binary. > > > > C:\TclBlend\bin>jtclsh > > > > % set derbyLib [ file join $env(DERBYHOME) lib ] > > C:/db-derby-10.2.2.0/lib > > > > % set env(TCL_CLASSPATH) $derbyLib > > C:/db-derby-10.2.2.0/lib > > > You probably need to specifiy each jar file, not just > the directory. > > e.g. > set derbyLib {C:/db-derby-10.2.2.0/lib/derby.jar C:/db-derby-10.2.2.0/lib/derbyclient.jar > ....etc...} > > > > > > The script works when started from a bat file with the jars are added to > the > > system classpath . > > > > > > ::set CLASSPATH=%CLASSPATH%;C:\db-derby-10.2.2.0\lib\derby.jar > > ::set CLASSPATH=%CLASSPATH%;C:\db-derby-10.2.2.0\lib\derbyclient.jar > > ::set CLASSPATH=%CLASSPATH%;C:\db-derby-10.2.2.0\lib\derbynet.jar > > ::set CLASSPATH=%CLASSPATH%;C:\db-derby-10.2.2.0\lib\derbytools.jar > > > > C:\TclBlend\bin\jtclsh.exe C:\startNetworkServer.tcl > > > -- > Tom Poindexter > tpo...@ny... Trid your list approach plus............ foreach i [ glob -directory C:/db-derby-10.2.2.0/lib/ *.jar ] { append env(TCL_CLASSPATH) $i\; } I get ............... cannot import class "org.apache.derby.drda.NetworkServerControl", it does not exist So TclBlend finds the class if the jars directory is specified but not if the jar file is added explicitly to the TCL_CLASSPATH variable i.e 6 below. The TclClassLoader seeks unresolved classes in these locations in the following order: 1. The cache of previously loaded classes 2. The CLASSPATH list 3. The pathList list, looking only in directories or jar files specified by pathList (available only for the java::load command) 4. The pathList again, inspecting all jar files found in each directory (only for the java::load command) 5. The env(TCL_CLASSPATH) list, looking only in directories or jar files specified by env(TCL_CLASSPATH) 6. The env(TCL_CLASSPATH) again, inspecting all jar files found in each directory The TCL_CLASSPATH variable works fine for all my MQ stuff. |