Article View: borland.public.jbuilder.java.language
Article #15496Re: How can I change directory?
From: Steve Horsley
Date: Tue, 01 Jun 1999 00:00
Date: Tue, 01 Jun 1999 00:00
24 lines
1535 bytes
1535 bytes
I had a feeling that I might have to keep track by hand. I will use my 'current directory' as a prepend string to all file requests which are not absolute. Then I can just change the prepend string as required. Thanks for confirming the need to do this. Steve. //----------------------------------- Tor Iver Wilhelmsen wrote: > > Steve Horsley <steve.horsley@cwcom.co.uk> writes: > > > I have written a little TFTP server. Currently, it serves files in > > whichever directory it is started in. I would like to have a dialog > > box that changes its default directory, but can't find anywhere in > > the API that lets me do this. > > Your basic problem is that you don't have an underlying shell > environment, so you need to keep tab on where you are manually: > FileDialog or JFileChooser could be of interest: Just call > fileDialog.getDirectory() or > jFileChooser.getSelectedFile().getAbsolutePath() to get the path.
Technical Details
Message-ID:
<37539155.24872F5B@cwcom.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<374E8F13.15EA206E@cwcom.co.uk> <u3e0d626c.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3e0c681cea759a16 X-Google-Attributes: gidf74b3,public From: Steve Horsley <steve.horsley@cwcom.co.uk> Subject: Re: How can I change directory? Date: 1999/06/01 Message-ID: <37539155.24872F5B@cwcom.co.uk> X-Deja-AN: 484377039 Content-Transfer-Encoding: 7bit References: <374E8F13.15EA206E@cwcom.co.uk> <u3e0d626c.fsf@sds.no> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Cable & Wireless Communications Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language