Hi,
How in java do I find the users home directory? I have an app that
needs to write some files to the current users Documents and Settings
directory on XP.
Thanks,
Bryan
Carl - 13 Jul 2007 19:34 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> Thanks,
> Bryan
Try:
String userHome = System.getProperty("user.home");
hope that helps,
Carl.
Oliver Wong - 13 Jul 2007 19:48 GMT
> Hi,
>
> How in java do I find the users home directory? I have an app that
> needs to write some files to the current users Documents and Settings
> directory on XP.
Use system properties. A list of available properties are at:
http://www.mindspring.com/~mgrand/java-system-properties.htm
- Oliver
Roedy Green - 13 Jul 2007 20:43 GMT
>How in java do I find the users home directory? I have an app that
>needs to write some files to the current users Documents and Settings
>directory on XP.
see http://mindprod.com/jgloss/properties.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com