Re: How to get path to current directory?
From: Brad BARCLAY (bbarclay_at_jsyncmanager.org)
Date: 10/02/03
- Next message: Brad BARCLAY: "Re: problems extracting a jar file"
- Previous message: Brad BARCLAY: "Re: I need help please...."
- In reply to: Tomek: "How to get path to current directory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 02 Oct 2003 17:50:09 GMT
Tomek wrote:
> Hello.
>
> How to get path to current directory and put this path to object of class
> String?
> I found FileSystemView.getHomeDirectory() but it returns path to home
> directory for example:
>
> C:\Documments and Settings\Thomas
Posting your query once really was sufficient.
To answer your question, try grabbing the "user.dir" property -- this
is the current working directory. To retreive this property, use
something akin to:
String userDir = System.getProperty("user.dir");
HTH!
Brad BARCLAY
-- =-=-=-=-=-=-=-=-= From the OS/2 WARP v4.5 Desktop of Brad BARCLAY. The jSyncManager Project: http://www.jsyncmanager.org
- Next message: Brad BARCLAY: "Re: problems extracting a jar file"
- Previous message: Brad BARCLAY: "Re: I need help please...."
- In reply to: Tomek: "How to get path to current directory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|