How to get local application data folder in Java? [duplicate]

System.getenv("APPDATA")

(there seems to be no env variable for the "Local Settings" folder, but this will give you the 'Application Data' folder)


what about the following

String dataFolder = System.getenv("LOCALAPPDATA");

I have a situation where this is NOT under "user.home"