changing working directory?  
Author Message
hack_tick





PostPosted: 2005-10-24 15:56:00 Top

java-programmer, changing working directory? hi there!
I am looking for changing the working directory, using j2se methods is
it possible?

 
Roedy Green





PostPosted: 2005-10-24 16:41:00 Top

java-programmer >> changing working directory? On 24 Oct 2005 00:56:11 -0700, "hack_tick" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :

>hi there!
>I am looking for changing the working directory, using j2se methods is
>it possible?

No. Part of the problem is defining what it would mean if thread A
changed it. What does thread B think?

What you do instead is define your own default directory, and in the
simplest case just feed it to File( dir, file) as the first parm.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Andrew Thompson





PostPosted: 2005-10-24 16:41:00 Top

java-programmer >> changing working directory? hack_tick wrote:

> I am looking for changing the working directory,

You're looking for the wrong thing*. Why do you
think you need that?

* A 'NetworkClassLoader' (see ClassLoader docs.)
and a FileDialog or JFileChooser can get at any
resource in the local file system, permissions granted.
 
 
hack_tick





PostPosted: 2005-10-24 16:55:00 Top

java-programmer >> changing working directory? m...i was using Runtime.exec i forgot it had overloaded method,

public Process exec(String[] cmdarray,
String[] envp,
File dir)
throws IOException

it seems i didnt do my homework :-(

sorry for any trouble

 
 
hack_tick





PostPosted: 2005-10-24 16:57:00 Top

java-programmer >> changing working directory? thx a lot, i will keep note of those ;-)