-
Enhancement
-
Resolution: Unresolved
-
P2
-
None
-
None
Applications may want to store some configuration data in the user profile. Often there are standard locations for storing such data, e.g.:
* *NIX: $HOME/.<app_name>
* Mac: $HOME/Library/Application Support/<app_name>
* Windows: %HOME%\AppData\Roaming\<app_name>
where the <app_name> represents an app-defined name of the application.
This is a request to introduce something like the following in JDK:
public static Path java.nio.file.Files.getAppDataPath(String appName);
that would return a Path object pointing to a directory where the app may store its data. The directory may not exist yet, and it is the responsibility of the app (not JDK) to create it if needed.
Note: in the future we may want to handle the Roaming vs. Local cases (either with a boolean argument for this method, or as a separate API call). However, currently this isn't a requirement.
This API is requested by JavaFX Web component. See https://javafx-jira.kenai.com/browse/RT-31920 and https://javafx-jira.kenai.com/browse/RT-31249 for more information. As a temporary solution we have implemented this functionality in FX native library Glass so that we can use it in JDK/FX 8. But since this API doesn't belong to a GUI toolkit, we would like to see this API implemented in core JDK instead.
It would be perfect to add this API in JDK 8 if possible. However, JDK 9 should work good for us as well.
* *NIX: $HOME/.<app_name>
* Mac: $HOME/Library/Application Support/<app_name>
* Windows: %HOME%\AppData\Roaming\<app_name>
where the <app_name> represents an app-defined name of the application.
This is a request to introduce something like the following in JDK:
public static Path java.nio.file.Files.getAppDataPath(String appName);
that would return a Path object pointing to a directory where the app may store its data. The directory may not exist yet, and it is the responsibility of the app (not JDK) to create it if needed.
Note: in the future we may want to handle the Roaming vs. Local cases (either with a boolean argument for this method, or as a separate API call). However, currently this isn't a requirement.
This API is requested by JavaFX Web component. See https://javafx-jira.kenai.com/browse/RT-31920 and https://javafx-jira.kenai.com/browse/RT-31249 for more information. As a temporary solution we have implemented this functionality in FX native library Glass so that we can use it in JDK/FX 8. But since this API doesn't belong to a GUI toolkit, we would like to see this API implemented in core JDK instead.
It would be perfect to add this API in JDK 8 if possible. However, JDK 9 should work good for us as well.
- relates to
-
JDK-8134300 .oracle_jre_usage folder must not be created in C:\Users\myName
- Closed
-
JDK-8017496 Mechanism to identify application
- Open