System property user.dir
- From: "MikeB" <MPBrede@xxxxxxxxx>
- Date: 28 Feb 2007 10:55:30 -0800
in the Java API guide (http://java.sun.com/j2se/1.5.0/docs/api/java/io/
File.html) the docs mention a system property user.dir that supposedly
has the current user directory.
How do I access the value in this property?
Alternately, is there another way I can establish a base directory
such that, in a subdirectory of my package/jar, I can store data for
the application to read?
Eg. if my application is running in C:x\y\z, I'd like to have a
directory whose fully-qualified name is C:x\y\z\data. If the
application is transported and later runs on D:\a\b\c\, I'd like that
directory to resolve to D:\a\b\c\data.
Thanks.
.
- Follow-Ups:
- Re: System property user.dir
- From: Eric Sosman
- Re: System property user.dir
- Prev by Date: Re: Print value of p from the infinite series
- Next by Date: Re: System property user.dir
- Previous by thread: DST changes and tzupdater
- Next by thread: Re: System property user.dir
- Index(es):