This is good enough:
String saveFolder;
if(os.startsWith("Win")) {
saveFolder = System.getProperty("user.home") + "/Application Data/" + gameName + "/";
}
else if(os.startsWith("linux") || os.startsWith("mac") || os.startsWith("darwin")) {
saveFolder = System.getProperty("user.home") + "/." + gameName + "/";
}
EDIT: Apparently “Application Data” also works on Vista and 7 for backwards compatibility purposes.