Yup, the problem that I was having was actually two-fold.  The first was
that I assumed that the env(TCLLIBPATH) variable was set through jacl
(which as stated below, it isn't).  I fixed that by manually setting the
auto_path variable in the interp object.  The second was also mentioned
below where I was trying to load a dll.  Guess I'll just have to figure
another way to solve the problem.

Thanks for your help!

Ron


On Tue, 24 Aug 1999, Moses DeJong wrote:

> On Tue, 24 Aug 1999, Ron Espiritu wrote:
> 
> > Hello everybody!
> 
> Jacl does not load native libraries, is that what you were trying to do?
> You should be able to load packages that are pure Tcl with no problems.
> 
> > I am having problems w/ using the "package require" command.  It seems that
> > under jacl, I can't load libraries.  A copy of a short session is pasted
> > below.  When I'm in java and I use the interp.pkgRequire command, I still
> > receive an exception stating that it cannot find the library.
> > 
> > I'm using jacl1.2.4 and Tcl 8.0.5 on a machine running NT.
> > 
> > Any suggestions on what to try to get this to work?  I'm probably missing
> > something really obvious.  Thanks!
> > 
> > Ron
> 
> Did you try setting the auto_path variable before doing the package
> require? Under Tclsh the env var TCLLIBPATH can be used to avoid
> setting the auto_path. In java, you can not access env vars so
> using the same TCLLIBPATH var is not possible. There is the
> option of defining a java property called TCLLIBPATH which should
> set the auto_path env var automatically.
> 
> java -DTCLLIBPATH=$somepath tcl.lang.Shell
> 
> Now that I think about it, the jaclsh wrapper script under UNIX
> could test to see if TCLLIBPATH is defined and then invoke java
> with the -DTCLIBPATH argument automatically. That would make
> jaclsh seem exactly like tclsh in this case. Perhasp that would
> be a good feature to add. What do you think?
> 
> later
> mo
>  
> > ---
> >     C:\>tclsh80
> >     % package require Tnm
> >     3.0.0
> >     % package require http
> >     2.0
> >     % exit
> > 
> >     C:\>java tcl.lang.Shell
> >     % package require Tnm
> >     can't find package Tnm
> >     % package require http
> >     can't find package http
> >     % exit
> > 
> > C:\>java test
> > tcl.lang.TclException: can't find package Tnm 3.0
> >         at tcl.lang.PackageCmd.pkgRequire(PackageCmd.java, Compiled Code)
> >         at tcl.lang.Interp.pkgRequire(Interp.java:2858)
> >         at Scotty.<init>(Scotty.java:18)
> >         at test.main(test.java:7)
> > ---
> > 
> 

----------------------------------------------------------------
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/

Reply via email to