{"action":"closed","issue":{"url":"https://api.github.com/repos/farin/JCloisterZone/issues/79","labels_url":"https://api.github.com/repos/farin/JCloisterZone/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/farin/JCloisterZone/issues/79/comments","events_url":"https://api.github.com/repos/farin/JCloisterZone/issues/79/events","html_url":"https://github.com/farin/JCloisterZone/issues/79","id":52592920,"number":79,"title":"Don't write files to the `JCloisterZone.jar` directory","user":{"login":"joelpurra","id":1398544,"avatar_url":"https://avatars.githubusercontent.com/u/1398544?v=3","gravatar_id":"","url":"https://api.github.com/users/joelpurra","html_url":"https://github.com/joelpurra","followers_url":"https://api.github.com/users/joelpurra/followers","following_url":"https://api.github.com/users/joelpurra/following{/other_user}","gists_url":"https://api.github.com/users/joelpurra/gists{/gist_id}","starred_url":"https://api.github.com/users/joelpurra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelpurra/subscriptions","organizations_url":"https://api.github.com/users/joelpurra/orgs","repos_url":"https://api.github.com/users/joelpurra/repos","events_url":"https://api.github.com/users/joelpurra/events{/privacy}","received_events_url":"https://api.github.com/users/joelpurra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-21T11:30:27Z","updated_at":"2015-01-13T19:36:29Z","closed_at":"2015-01-13T19:36:29Z","body":"It seems several files are written to the game directory by default. Yes, JCZ developers may use a writeable location when debugging, but it's both bad practice to write there and assume that it's writeable for others. Would still prefer a more standardized per-user storage location.\r\n\r\nKeep in mind that Windows did a move against users having write access to program folders several years ago - \"old programs that don't know better\" now write to a virtual folder structure that is hidden in a completely different place (per user). Unix-based systems have had non-writeable application locations longer than that.\r\n\r\nIn lack of proper multi-platform \"My Documents\"/\"My Save Games\" path usage (unless there's a good library), `System.getProperty(\"user.home\")` seems like a good start. There's also `String DefaultFolder=new JFileChooser().getFileSystemView().getDefaultDirectory().toString();` and (for Windows) `System.getenv(\"USERPROFILE\")`. Some strings seem Windows language dependent, like `%USERPROFILE%\\Saved Games`\r\nhttp://stackoverflow.com/questions/9677692/getting-my-documents-path-in-java\r\nhttp://stackoverflow.com/questions/5590040/cross-platform-way-to-ask-for-the-users-documents-folder\r\nhttps://en.wikipedia.org/wiki/Special_folder"}}