Skip to Main Content

Java SE (Java Platform, Standard Edition)

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!

Easiest way to find C:\Documents and Settings\user\Application Data

843810Aug 3 2006 — edited Feb 4 2007
Is there a simple way to get the path to a user's application data directory from the system? I don't want to hard code in something like
System.getProperty("user.home")+"\Application Data\";
I would LOVE IT if there was a cross-platform way to find where application config data should sit for a particular user. In other words, for an app named "MyJavaApp", on Windows you would want C:\Documents and Settings\user\Application Data\MyJavaApp. On Linux you would want /home/user/.MyJavaApp.

Is there a good, cross-platform way of doing this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2007
Added on Aug 3 2006
2 comments
231 views