开发者

Access to the Environment.SpecialFolder

My Desktop Application needs to store and retrieve data from files stored in ProgramData folder (in Win 7). How can I get access to the Environment.SpecialFolder regardless o开发者_运维百科f the Operating System whether it is Win 7 or Win XP? Thanks.


I am not sure Java provides this. You can access it, on Windows 7 through the environment variable CSIDL_COMMON_APPDATA or ProgramData:

File appData = new File(System.getenv("CSIDL_COMMON_APPDATA"));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜