I have a Java swing application that saves a lot of data (for example, you might think about a game and saving it). This data is stored in files, not in a database.
I would like to save these files next to the installation files (.jar file) of my application. Some users (like me) are used to delete the default application folder of the OS when it becomes large, and I do not want them to lose their data in this way.
Any ideas how to do this easily? How to get the .jar file folder from a program that runs a form that is a .jar file? Or how can I output files directly to some kind of package? How to create packages (folders inside banks) dynamically? Or is there an easy way to distribute a Java application in other formats, then .jar, and then save the generated data in the installation folder (under)?
Thanks for reading
source
share