Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

changing working directory?

Thread view: 
hack_tick - 24 Oct 2005 08:56 GMT
hi there!
I am looking for changing the working directory, using j2se methods is
it possible?
Roedy Green - 24 Oct 2005 09:40 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

hack_tick - 24 Oct 2005 09:55 GMT
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
Andrew Thompson - 24 Oct 2005 09:41 GMT
> 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 - 24 Oct 2005 09:56 GMT
thx a lot, i will keep note of those ;-)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.