API for Windows system paths and variables

Mike Swingler swingler at apple.com
Mon Jan 24 11:43:23 PST 2011


On Jan 24, 2011, at 11:22 AM, Ulf Zibis wrote:

> Hi all,
> 
> wouldn't it be interesting to have standard system paths available from FileSystem class, e.g. for Windows:
> %APPDATA%
> %AllUsersProfile%
> %SystemDrive%
> 
> I ask this, because there is a problem to save a Java application's data to system's application data location.
> The question came up because of this bug:
> [Bug 57798] [41cat] Move netbeans_default_userdir to APPDATA
> 
> Without using Windows API, NetBeans installer isn't able to determine the system's application data standard location.

I would highly support this. On Mac OS X, we have custom API which vends a variety of different directories for different purposes and different domains:
<http://developer.apple.com/library/mac/documentation/Java/Reference/JavaSE6_AppleExtensionsRef/api/com/apple/eio/FileManager.html#findFolder(short,%20int)>

It would be nice to have a cross-platform way to ask for the machine or user scoped directory for "app data" or "plugins".

Mike Swingler
Java Engineering
Apple Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20110124/f98c4c34/attachment.html 


More information about the nio-discuss mailing list