Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

On Windows XP how do you find the location of the Application Data Folder

paultaylorSep 24 2007 — edited Jan 31 2008
On Windows XP how do you find the location of the C:\Documents and Settings\%username%\Local Settings\Application Data in a language independent way.

I know I can use System.getProperty("user.home") to return the C:\Documents and Settings\%username% part, but I actually want to store my log files for an application in the Local Settings/Application Data directory and I assume these folder names would vary if using Windows in a language other than English.

I used to store all my logs files in the applications installation folder, but been advised this is not a good idea as more users start having adminstrator accounts and seperate user accounts, and apparently storing the files just under %username% causes problems for labtops users who are syncing there data when using roaming profiles in a network situation.

Also, are there any differences wrt to Windows Vista.

Edited by: paultaylor on Sep 24, 2007 9:48 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 28 2008
Added on Sep 24 2007
14 comments
618 views