changing working directory?

H

hack_tick

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

Roedy Green

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.
 
A

Andrew Thompson

hack_tick said:
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.
 
H

hack_tick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top