Yes, the user.dir property does not change during the execution
of a Java program. In fact, there is not way to do a "cd" in Java.
Jacl simply keeps track of the last place the user cd'ed to inside
the interp structure. The reason for this is that Java is
multithreaded and the current directory is a per-thread bit
o data. You will also run into this problem when exec'ing a
program because there is no way to exec a sub program in Java
that starts in a different directory. Jacl uses an ugly hack
which writes out a shell script and then exec'es /bin/sh on
the shell script to get around this problem.
Mo DeJong
dejong at cs.umn.edu
On Tue, 30 Mar 1999, Thomas McKay wrote:
> Is there a reason that the 'cd' and 'pwd' commands use a value within
> Interp rather than setting and getting the system property "user.dir"?
> I haven't tried, but I assume that if the user.dir property is adjusted
> then attempting to open a file from within the Java portion of the
> application will look in the current user.dir location.
> Tom
>
>
> ----------------------------------------------------------------
> 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/
>
----------------------------------------------------------------
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/