title: How do I get the value of Windows' %APPDATA% location variable in Java?
body: <p>I'm trying to make my program save its state in the location set by <code>%APPDATA%</code> when the user is using Windows. However, <code>System.getProperty("temp.dir");</code> does not return that. <strong>How do I get the value of the <code>%APPDATA%</code> variable in Windows, for the purpose of state saving?</strong></p>