%ProgramData%. For example, say we want MaxMind's GeoLite2 database file available to several applications. It should go at
On Ubuntu, the correct place to store shared program data is
/srv. So GeoLite would go at
It would be nice in Java to have a cross-platform system property to access these locations easily. Here's how.
setx JAVA_TOOL_OPTIONS "%JAVA_TOOL_OPTIONS% -Dshared.data=%ProgramData%" -m
sudo nano /etc/environment
Add/update the following:
Then in a Java/Spring program you can use the system property like: