What is the best way to save application settings?
Posted on 2009-02-10
I'm writing a small application in Java and want the user to be able to save a few settings that is applied everytime the application is started. I'm new to Java and was thinking about just using txt files at first, but it seems extremely complicated to read and write from these with Java compared to e.g. VB so I was thinking of maybe creating an Settings object and use serialization to a file instead, which seems much easier. However it would be nice though to be able to have the user edit some definition txt files, which is of course then impossible as the serialized object can only be accessed by the application. And xml file couild be a possibility as well I guess, but I suppose it is as complex using as txts? The reason I dont want this to be too complex is because of the fact that the application is part of a school project and the settings handling is not an important part seen in terms of grading, but it would help in the overall grading I'm sure.