This content has been marked as final. Show 2 replies
If it's possible to write a file into a jar on the fly, it's not easy. That's not really what it's for, and I think generally it would be a bad idea. Think about deployment units. If you create a resource for deployment (e.g., a jar file) the last thing you want is for that resource to change at run time. It would make support impossible. (Imagine this in a large-scale enterprise environment.)
I think for a high score file, there are two good options. For a file that's shared between users, you can contact a central server and send scores there. For a single player, you can do
(I think so; check the API docs to make sure) to get the user's home directory, and then write the file there or under there (for example on a Windows system you might want to get the home directory and then look for the "Application Data" folder, or something.
That's very helpful, thank you very much ^^ I've finished my project.