How to get path to current directory?  
Author Message
pantomaszw





PostPosted: 2003-10-2 20:30:00 Top

java-programmer, How to get path to current directory? 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

Thanks for help.
 
Brad BARCLAY





PostPosted: 2003-10-3 1:50:00 Top

java-programmer >> How to get path to current directory? 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