I'm having trouble with the 'package require java' command. It will execute just fine from the tclsh prompt but gets an error when run from within my C test program. Here's the screen output: TCLSH output >-----------------------------------------------------------------------< d:\>tclsh % package require java 1.1.1 % puts $auto_path d:/mdisql/tcl8.0/lib/tcl8.0 d:/mdisql/tcl8.0/lib % exit C PROGRAM output >-----------------------------------------------------------------------< d:\>qasql -Uuserid -Ppasswd -Sservice 1> puts $auto_path /remote/srel2/tnt/release/lib/qasql 1> set auto_path "d:/mdisql/tcl8.0/lib/tcl8.0 d:/mdisql/tcl8.0/lib" 1> puts $env(TCL_LIBRARY) d:\mdisql\tcl8.0\lib 1> puts [package require java] Exception in thread "main" java.lang.NoClassDefFoundError: tcl/lang/Interp ERROR(5): Loading 'd:/mdisql/Tcl8.0/lib/tclblend1.1.1/tclblend.dll' failed. This can happen if the appropriate Java .dlls are not in your path. Under JDK1.1, tclblend uses javai.dll, which is usually found in c:\jdk1.1.6\bin. Under JDK1.2, tclblend uses jvm.lib, which is usually found in c:\jdk1.1.2\jre\bin\classic. You may need to add the appropriate directory to your PATH. The error was: could not find class tcl/lang/Interp. Check that your path includes the directory where tclblend.dll resides. Try looking in the directories under the value of tcl_library, currently: d:/mdisql/tcl8.0/lib/tcl8.0 Currently, the CLASSPATH environment variable is set to: d:\mdisql\tcl8.0\lib\tclblend1.1.1;c:\jdk1.1.7B\bin;c:\jdk1.1.7b\lib\classes.zip; C:\Program Files\Exceed.nt\hcljrcsv.zip;C:\Program Files\Exceed.nt The JVM currently is using the following classpath:c:\jdk1.1.7b\bin\..\classes;c:\jdk1.1.7b\bin\..\lib\classes.zip; c:\jdk1.1.7b\bin\..\lib\classes.jar;c:\jdk1.1.7b\bin\..\lib\rt.jar; c:\jdk1.1.7b\bin\..\lib\i18n.jar 1> puts $env(TCL_LIBRARY) d:\mdisql\tcl8.0\lib 1> exit The thing that jumps out at me is how TCL_LIBRARY is reported in the error message to be: d:/mdisql/tcl8.0/lib/tcl8.0 yet before and after issuing the 'package require java' command, it is reported to be: d:/mdisql/tcl8.0/lib The second is the correct value that it should be set to and the way it is set in the system's environment. This error is being trapped at or around line 153 of pkgIndex.tcl. if [catch {load $native_lib} errMsg] { ... } Why would the load command be using a different value for TCL_LIBRARY than the one set in the environment? Also of note is how auto_path is set to one thing when in tclsh and something entirely different when running the C Program. Is it possible that these things are the cause my problem? I have the jdk1.1.7b\bin directory on my path and the CLASSPATH contains the tclblend1.1.1 directory. Is there something else I should be looking for? This C Program reads tcl scripts but also allows SQL calls to be made into a few different databases. Any help would be greatly appreciated. thanks, -Mike Bryan ---------------------------------------------------------------- The TclJava mailing list is sponsored by WebNet Technologies. To subscribe: send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'. A list archive is at: http://www.findmail.com/listsaver/tcldallas/