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!

installation of Java app under Vista/ System.getenv("ALLUSERSPROFILE")

802908Jan 16 2008 — edited Jan 17 2008
Hello

at the moment im trying to install my Java (JDK 1.5.012) application under Windows Vista.
I have several ini files, db files and log files, and everybody should have read and write access on them.
So i removed them from the "C:\Program Files" path, since virtualisation takes place which id like not to depend on.
Ive read that "C:\Documents and Settings\All Users" is the right place for such stuff (or better said an own subdirectory under this path).

Now im looking for a way to retrieve this path. I have tried System.getenv("ALLUSERSPROFILE"), and on my W2000 machine, it returns "C:\Documents and Settings\All Users" which is fine. On my Vista machine, the same
function returns "C:\ProgramData", but this is a virtual path.

How can i retrieve the All Users path under Vista using System functions?
I dont want to hardcode this, because this path is certainly different under different languages.

friendly greetings

BB
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2008
Added on Jan 16 2008
4 comments
178 views