I’m trying to make my program save its state in the location set by %APPDATA% when the user is using Windows. However, System.getProperty("temp.dir"); does not return that. How do I get the value of the %APPDATA% variable in Windows, for the purpose of state saving?
I’m trying to make my program save its state in the location set by
Share
Use System.getenv()
But I think
should be preferred even though it’s not exactly the same thing because it is more portable.